Documentation ¶
Index ¶
- Constants
- Variables
- func NewAddrs(db *leveldb.DB) (*addrs, error)
- func NewArbiters(db *leveldb.DB, originArbiters [][]byte, arbitersCount int) *arbiters
- func NewCustomID(db *leveldb.DB, GenesisBlockAddress string) *customID
- func NewDataStore(dataDir string, originArbiters [][]byte, arbitersCount int, ...) (*dataStore, error)
- func NewHeaderStore(dataDir string, newHeader func() util.BlockHeader) (*headers, error)
- func NewOps(db *leveldb.DB) *ops
- func NewQue(db *leveldb.DB) *que
- func NewTxTypes(db *leveldb.DB) (*txTypes, error)
- func NewTxs(db *leveldb.DB) *txs
- type Addrs
- type Arbiters
- type CustomID
- type CustomIDInfo
- type DataBatch
- type DataStore
- type HeaderStore
- type Ops
- type OpsBatch
- type Que
- type QueBatch
- type QueItem
- type RevertInfo
- type TxTypes
- type Txs
- type TxsBatch
Constants ¶
View Source
const ( DefaultConfirmations uint32 = 6 DefaultFeeRate common.Fixed64 = 1e8 )
Variables ¶
View Source
var ( // addresses BKTAddrs = []byte("addrs") // transaction types BKTTxTypes = []byte("txtypes") // headers BKTHeaders = []byte("headers") BKTIndexes = []byte("indexes") BKTChainTip = []byte("chaintip") // ops BKTOps = []byte("ops") // que BKTQue = []byte("que") BKTQueIdx = []byte("qindex") // transactions BKTTxs = []byte("transactions") BKTHeightTxs = []byte("heighttxs") BKTForkTxs = []byte("forktxs") // arbiters BKTArbiters = []byte("arbiters") BKTArbPosition = []byte("arbptn") BKTArbPositions = []byte("arbpts") BKTArbitersData = []byte("arbdata") BKTTransactionHeight = []byte("txheight") // revert to pow BKTRevertPosition = []byte("revertp") BKTRevertPositions = []byte("revertps") //ReturnSideChainDepositCoin BKTReturnSideChainDepositCoin = []byte("retschdepositcoin") BKTReservedCustomID = []byte("rscid") BKTReceivedCustomID = []byte("rccid") BKTChangeCustomIDFee = []byte("ccidf") BKTCustomIDFeePositions = []byte("cidfps") )
Functions ¶
func NewArbiters ¶ added in v0.0.5
func NewCustomID ¶ added in v0.0.7
func NewDataStore ¶
func NewDataStore(dataDir string, originArbiters [][]byte, arbitersCount int, GenesisBlockAddress string) (*dataStore, error)
//this spv GenesisBlockAddress
GenesisBlockAddress string
func NewHeaderStore ¶
func NewHeaderStore(dataDir string, newHeader func() util.BlockHeader) (*headers, error)
func NewTxTypes ¶ added in v0.1.0
Types ¶
type Arbiters ¶ added in v0.0.5
type Arbiters interface { database.DB Put(height uint32, crcArbiters [][]byte, normalArbiters [][]byte) error BatchPut(height uint32, crcArbiters [][]byte, normalArbiters [][]byte, batch *leveldb.Batch) error Get() (crcArbiters [][]byte, normalArbiters [][]byte, err error) GetNext() (workingHeight uint32, crcArbiters [][]byte, normalArbiters [][]byte, err error) GetByHeight(height uint32) (crcArbiters [][]byte, normalArbiters [][]byte, err error) BatchPutRevertTransaction(batch *leveldb.Batch, workingHeight uint32, mode byte) error GetConsensusAlgorithmByHeight(height uint32) (byte, error) GetRevertInfo() []RevertInfo }
type CustomID ¶ added in v0.0.7
type CustomID interface { database.DB PutControversialReservedCustomIDs( reservedCustomIDs []string, proposalHash common.Uint256) error BatchPutControversialReservedCustomIDs(reservedCustomIDs []string, proposalHash common.Uint256, batch *leveldb.Batch) error BatchDeleteControversialReservedCustomIDs( proposalHash common.Uint256, batch *leveldb.Batch) PutControversialReceivedCustomIDs(reservedCustomIDs []string, did common.Uint168, proposalHash common.Uint256) error BatchPutControversialReceivedCustomIDs(receivedCustomIDs []string, did common.Uint168, proposalHash common.Uint256, batch *leveldb.Batch) error BatchDeleteControversialReceivedCustomIDs( proposalHash common.Uint256, batch *leveldb.Batch) BatchPutRetSideChainDepositCoinTx(tx it.Transaction, batch *leveldb.Batch) error BatchDeleteRetSideChainDepositCoinTx(tx it.Transaction, batch *leveldb.Batch) error PutControversialChangeCustomIDFee(rate common.Fixed64, proposalHash common.Uint256, workingHeight uint32) error BatchPutControversialChangeCustomIDFee(rate common.Fixed64, proposalHash common.Uint256, workingHeight uint32, batch *leveldb.Batch) error BatchDeleteControversialChangeCustomIDFee( proposalHash common.Uint256, batch *leveldb.Batch) PutCustomIDProposalResults(results []payload.ProposalResult, height uint32) error BatchPutCustomIDProposalResults(results []payload.ProposalResult, height uint32, batch *leveldb.Batch) error GetReservedCustomIDs(height uint32, info []RevertInfo) (map[string]struct{}, error) GetReceivedCustomIDs(height uint32, info []RevertInfo) (map[string]common.Uint168, error) GetCustomIDFeeRate(height uint32) (common.Fixed64, error) //Is this RetSideChainDepositCoin tx exist HaveRetSideChainDepositCoinTx(txHash common.Uint256) bool }
type CustomIDInfo ¶ added in v0.1.0
type HeaderStore ¶
type RevertInfo ¶ added in v0.1.0
type Txs ¶
type Txs interface { database.DB Put(tx *util.Tx) error Get(txId *common.Uint256) (*util.Tx, error) GetAll() ([]*util.Tx, error) GetIds(height uint32) ([]*common.Uint256, error) PutForkTxs(txs []*util.Tx, hash *common.Uint256) error GetForkTxs(hash *common.Uint256) ([]*util.Tx, error) Del(txId *common.Uint256) error Batch() TxsBatch }
Click to show internal directories.
Click to hide internal directories.