Documentation
¶
Index ¶
- Variables
- func UseLogger(logger l.Logger)
- type ChainDB
- func (cdb *ChainDB) CleanAddrIdx(finish bool) error
- func (cdb *ChainDB) CleanInvalidTxIdx() error
- func (cdb *ChainDB) Close()
- func (cdb *ChainDB) CloseDatabases() (errors []error)
- func (cdb *ChainDB) DB() ethdb.Database
- func (cdb *ChainDB) DBEngine() string
- func (cdb *ChainDB) DeleteAddrIdx(sblock *types.SerializedBlock, stxos [][]byte) error
- func (cdb *ChainDB) DeleteDAGBlock(blockID uint) error
- func (cdb *ChainDB) DeleteDAGBlockIdByHash(bh *hash.Hash) error
- func (cdb *ChainDB) DeleteDAGTip(id uint) error
- func (cdb *ChainDB) DeleteDiffAnticone(id uint) error
- func (cdb *ChainDB) DeleteEstimateFee() error
- func (cdb *ChainDB) DeleteInvalidTxs(sblock *types.SerializedBlock, block model.Block) error
- func (cdb *ChainDB) DeleteMainChainBlock(blockID uint) error
- func (cdb *ChainDB) DeleteSpendJournal(bh *hash.Hash) error
- func (cdb *ChainDB) DeleteTokenState(blockID uint) error
- func (cdb *ChainDB) DeleteTxHashs(block *types.SerializedBlock) error
- func (cdb *ChainDB) DeleteTxIdxEntrys(block *types.SerializedBlock) error
- func (cdb *ChainDB) DeleteUtxo(key []byte) error
- func (cdb *ChainDB) ForeachUtxo(fn func(key []byte, data []byte) error) error
- func (cdb *ChainDB) Get(key []byte) ([]byte, error)
- func (cdb *ChainDB) GetAddrIdxTip() (*hash.Hash, uint, error)
- func (cdb *ChainDB) GetBestChainState() ([]byte, error)
- func (cdb *ChainDB) GetBlock(hash *hash.Hash) (*types.SerializedBlock, error)
- func (cdb *ChainDB) GetBlockBytes(hash *hash.Hash) ([]byte, error)
- func (cdb *ChainDB) GetBlockIdByOrder(order uint) (uint, error)
- func (cdb *ChainDB) GetDAGBlock(blockID uint) ([]byte, error)
- func (cdb *ChainDB) GetDAGBlockIdByHash(bh *hash.Hash) (uint, error)
- func (cdb *ChainDB) GetDAGTips() ([]uint, error)
- func (cdb *ChainDB) GetDagInfo() ([]byte, error)
- func (cdb *ChainDB) GetDiffAnticones() ([]uint, error)
- func (cdb *ChainDB) GetEstimateFee() ([]byte, error)
- func (cdb *ChainDB) GetHeader(hash *hash.Hash) (*types.BlockHeader, error)
- func (cdb *ChainDB) GetInfo() (*common.DatabaseInfo, error)
- func (cdb *ChainDB) GetInvalidTx(id *hash.Hash) (*types.Transaction, error)
- func (cdb *ChainDB) GetInvalidTxIdByHash(fullHash *hash.Hash) (*hash.Hash, error)
- func (cdb *ChainDB) GetInvalidTxIdxTip() (uint64, *hash.Hash, error)
- func (cdb *ChainDB) GetSpendJournal(bh *hash.Hash) ([]byte, error)
- func (cdb *ChainDB) GetTokenState(blockID uint) ([]byte, error)
- func (cdb *ChainDB) GetTxForAddress(addr types.Address, numToSkip, numRequested uint32, reverse bool) ([]*common.RetrievedTx, uint32, error)
- func (cdb *ChainDB) GetTxIdByHash(fullHash *hash.Hash) (*hash.Hash, error)
- func (cdb *ChainDB) GetTxIdxEntry(id *hash.Hash, verbose bool) (*types.Tx, *hash.Hash, error)
- func (cdb *ChainDB) GetUtxo(key []byte) ([]byte, error)
- func (cdb *ChainDB) HasBlock(hash *hash.Hash) bool
- func (cdb *ChainDB) HasMainChainBlock(blockID uint) bool
- func (cdb *ChainDB) Init() error
- func (cdb *ChainDB) IsInvalidTxIdxEmpty() bool
- func (cdb *ChainDB) IsLegacy() bool
- func (cdb *ChainDB) Name() string
- func (cdb *ChainDB) OpenDatabase(name string, cache, handles int, namespace string, readonly bool) (ethdb.Database, error)
- func (cdb *ChainDB) OpenDatabaseWithFreezer(name string, cache, handles int, ancient string, namespace string, ...) (ethdb.Database, error)
- func (cdb *ChainDB) Put(key []byte, value []byte) error
- func (cdb *ChainDB) PutAddrIdx(sblock *types.SerializedBlock, block model.Block, stxos [][]byte) error
- func (cdb *ChainDB) PutAddrIdxTip(bh *hash.Hash, order uint) error
- func (cdb *ChainDB) PutBestChainState(data []byte) error
- func (cdb *ChainDB) PutBlock(block *types.SerializedBlock) error
- func (cdb *ChainDB) PutBlockIdByOrder(order uint, id uint) error
- func (cdb *ChainDB) PutDAGBlock(blockID uint, data []byte) error
- func (cdb *ChainDB) PutDAGBlockIdByHash(bh *hash.Hash, id uint) error
- func (cdb *ChainDB) PutDAGTip(id uint, isMain bool) error
- func (cdb *ChainDB) PutDagInfo(data []byte) error
- func (cdb *ChainDB) PutDiffAnticone(id uint) error
- func (cdb *ChainDB) PutEstimateFee(data []byte) error
- func (cdb *ChainDB) PutInfo(di *common.DatabaseInfo) error
- func (cdb *ChainDB) PutInvalidTxIdxTip(order uint64, bh *hash.Hash) error
- func (cdb *ChainDB) PutInvalidTxs(sblock *types.SerializedBlock, block model.Block) error
- func (cdb *ChainDB) PutMainChainBlock(blockID uint) error
- func (cdb *ChainDB) PutSpendJournal(bh *hash.Hash, data []byte) error
- func (cdb *ChainDB) PutTokenState(blockID uint, data []byte) error
- func (cdb *ChainDB) PutTxHashs(block *types.SerializedBlock) error
- func (cdb *ChainDB) PutTxIdxEntrys(sblock *types.SerializedBlock, block model.Block) error
- func (cdb *ChainDB) PutUtxo(key []byte, data []byte) error
- func (cdb *ChainDB) Rebuild(mgr model.IndexManager) error
- func (cdb *ChainDB) ResolveAncient(name string, ancient string) string
- func (cdb *ChainDB) Snapshot() error
- func (cdb *ChainDB) SnapshotInfo() string
- func (cdb *ChainDB) StartTrack(info string) error
- func (cdb *ChainDB) StopTrack() error
- func (cdb *ChainDB) TryUpgrade(di *common.DatabaseInfo, interrupt <-chan struct{}) error
- func (cdb *ChainDB) UpdateUtxo(opts []*common.UtxoOpt) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DBDirectoryName = "meerchain" CreateIfNoExist = true )
View Source
var ( ErrDBClosed = errors.New("Database is closed") ErrDBAbsent = errors.New("Database is absent") )
Functions ¶
Types ¶
type ChainDB ¶
type ChainDB struct {
// contains filtered or unexported fields
}
func (*ChainDB) CleanAddrIdx ¶
func (*ChainDB) CleanInvalidTxIdx ¶
func (*ChainDB) CloseDatabases ¶
func (*ChainDB) DeleteAddrIdx ¶
func (cdb *ChainDB) DeleteAddrIdx(sblock *types.SerializedBlock, stxos [][]byte) error
func (*ChainDB) DeleteDAGBlock ¶
func (*ChainDB) DeleteDAGBlockIdByHash ¶
func (*ChainDB) DeleteDAGTip ¶
func (*ChainDB) DeleteDiffAnticone ¶
func (*ChainDB) DeleteEstimateFee ¶
func (*ChainDB) DeleteInvalidTxs ¶
func (*ChainDB) DeleteMainChainBlock ¶
func (*ChainDB) DeleteTokenState ¶
func (*ChainDB) DeleteTxHashs ¶
func (cdb *ChainDB) DeleteTxHashs(block *types.SerializedBlock) error
func (*ChainDB) DeleteTxIdxEntrys ¶
func (cdb *ChainDB) DeleteTxIdxEntrys(block *types.SerializedBlock) error
func (*ChainDB) DeleteUtxo ¶
func (*ChainDB) ForeachUtxo ¶
func (*ChainDB) GetBestChainState ¶
func (*ChainDB) GetDAGBlockIdByHash ¶
func (*ChainDB) GetDAGTips ¶
func (*ChainDB) GetDagInfo ¶
func (*ChainDB) GetDiffAnticones ¶
func (*ChainDB) GetEstimateFee ¶
func (*ChainDB) GetInvalidTx ¶
func (*ChainDB) GetInvalidTxIdByHash ¶
func (*ChainDB) GetInvalidTxIdxTip ¶
func (*ChainDB) GetSpendJournal ¶
func (*ChainDB) GetTxForAddress ¶
func (*ChainDB) GetTxIdByHash ¶
func (*ChainDB) GetTxIdxEntry ¶
func (*ChainDB) HasMainChainBlock ¶
func (*ChainDB) IsInvalidTxIdxEmpty ¶
func (*ChainDB) OpenDatabase ¶
func (*ChainDB) OpenDatabaseWithFreezer ¶
func (*ChainDB) PutAddrIdx ¶
func (*ChainDB) PutBestChainState ¶
func (*ChainDB) PutBlockIdByOrder ¶
func (*ChainDB) PutDAGBlockIdByHash ¶
func (*ChainDB) PutDagInfo ¶
func (*ChainDB) PutDiffAnticone ¶
func (*ChainDB) PutEstimateFee ¶
func (*ChainDB) PutInvalidTxIdxTip ¶
func (*ChainDB) PutInvalidTxs ¶
func (*ChainDB) PutMainChainBlock ¶
func (*ChainDB) PutSpendJournal ¶
func (*ChainDB) PutTxHashs ¶
func (cdb *ChainDB) PutTxHashs(block *types.SerializedBlock) error
func (*ChainDB) PutTxIdxEntrys ¶
func (*ChainDB) ResolveAncient ¶
func (*ChainDB) SnapshotInfo ¶
func (*ChainDB) StartTrack ¶
func (*ChainDB) TryUpgrade ¶
func (cdb *ChainDB) TryUpgrade(di *common.DatabaseInfo, interrupt <-chan struct{}) error
Click to show internal directories.
Click to hide internal directories.