Documentation ¶
Index ¶
- type Chain
- type IndexDB
- func (iDB *IndexDB) CleanAllData() error
- func (iDB *IndexDB) Close() error
- func (iDB *IndexDB) DeleteOnRoad(toAddress types.Address, sendBlockHash types.Hash)
- func (iDB *IndexDB) GetAccountAddress(accountId uint64) (*types.Address, error)
- func (iDB *IndexDB) GetAccountBlockLocation(addr *types.Address, height uint64) (*chain_file_manager.Location, error)
- func (iDB *IndexDB) GetAccountBlockLocationByHash(blockHash *types.Hash) (*chain_file_manager.Location, error)
- func (iDB *IndexDB) GetAccountBlockLocationByHeight(addr *types.Address, height uint64) (*types.Hash, *chain_file_manager.Location, error)
- func (iDB *IndexDB) GetAccountBlockLocationList(hash *types.Hash, count uint64) (*types.Address, []*chain_file_manager.Location, [2]uint64, error)
- func (iDB *IndexDB) GetAccountBlockLocationListByHeight(addr types.Address, height uint64, count uint64) ([]*chain_file_manager.Location, [2]uint64, error)
- func (iDB *IndexDB) GetAccountBlockLocationListByRange(addr types.Address, start, end uint64) ([]*chain_file_manager.Location, [2]uint64, error)
- func (iDB *IndexDB) GetAccountId(addr *types.Address) (uint64, error)
- func (iDB *IndexDB) GetAddrHeightByHash(blockHash *types.Hash) (*types.Address, uint64, error)
- func (iDB *IndexDB) GetConfirmHeightByHash(blockHash *types.Hash) (uint64, error)
- func (iDB *IndexDB) GetLatestAccountBlock(addr *types.Address) (uint64, *chain_file_manager.Location, error)
- func (iDB *IndexDB) GetLatestSnapshotBlockLocation() (*chain_file_manager.Location, error)
- func (iDB *IndexDB) GetOnRoadHashList(addr types.Address, pageNum, pageSize int) ([]types.Hash, error)
- func (iDB *IndexDB) GetRangeSnapshotBlockLocations(startHash *types.Hash, endHash *types.Hash) ([]*chain_file_manager.Location, [2]uint64, error)
- func (iDB *IndexDB) GetReceivedBySend(sendBlockHash *types.Hash) (*types.Hash, error)
- func (iDB *IndexDB) GetSnapshotBlockByHeight(height uint64) (*types.Hash, *chain_file_manager.Location, error)
- func (iDB *IndexDB) GetSnapshotBlockHeight(hash *types.Hash) (uint64, error)
- func (iDB *IndexDB) GetSnapshotBlockLocation(height uint64) (*chain_file_manager.Location, error)
- func (iDB *IndexDB) GetSnapshotBlockLocationByHash(hash *types.Hash) (*chain_file_manager.Location, error)
- func (iDB *IndexDB) GetSnapshotBlockLocationList(blockHash *types.Hash, higher bool, count uint64) ([]*chain_file_manager.Location, [2]uint64, error)
- func (iDB *IndexDB) GetSnapshotBlockLocationListByHeight(height uint64, higher bool, count uint64) ([]*chain_file_manager.Location, [2]uint64, error)
- func (iDB *IndexDB) GetStatus() []interfaces.DBStatus
- func (iDB *IndexDB) HasAccount(addr types.Address) (result bool, returnErr error)
- func (iDB *IndexDB) Init(c Chain) error
- func (iDB *IndexDB) InitAccountId()
- func (iDB *IndexDB) InsertAccountBlock(accountBlock *ledger.AccountBlock) error
- func (iDB *IndexDB) InsertSnapshotBlock(snapshotBlock *ledger.SnapshotBlock, confirmedBlocks []*ledger.AccountBlock, ...)
- func (iDB *IndexDB) IsAccountBlockExisted(hash *types.Hash) (bool, error)
- func (iDB *IndexDB) IsReceived(sendBlockHash *types.Hash) (bool, error)
- func (iDB *IndexDB) IsSnapshotBlockExisted(hash *types.Hash) (bool, error)
- func (iDB *IndexDB) IterateAccounts(iterateFunc func(addr types.Address, accountId uint64, err error) bool)
- func (iDB *IndexDB) LoadAllHash() (map[types.Address][]types.Hash, error)
- func (iDB *IndexDB) LoadRange(addrList []types.Address, loadFn interfaces.LoadOnroadFn) error
- func (iDB *IndexDB) RollbackAccountBlocks(accountBlocks []*ledger.AccountBlock) error
- func (iDB *IndexDB) RollbackSnapshotBlocks(deletedSnapshotSegments []*ledger.SnapshotChunk, ...) error
- func (iDB *IndexDB) Store() *chain_db.Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IndexDB ¶
type IndexDB struct {
// contains filtered or unexported fields
}
func NewIndexDB ¶
func (*IndexDB) CleanAllData ¶
func (*IndexDB) DeleteOnRoad ¶
delete onroad directly
func (*IndexDB) GetAccountAddress ¶
func (*IndexDB) GetAccountBlockLocation ¶
func (*IndexDB) GetAccountBlockLocationByHash ¶
func (*IndexDB) GetAccountBlockLocationByHeight ¶
func (*IndexDB) GetAccountBlockLocationList ¶
func (*IndexDB) GetAccountBlockLocationListByHeight ¶
func (*IndexDB) GetAccountBlockLocationListByRange ¶
func (*IndexDB) GetAccountId ¶
func (*IndexDB) GetAddrHeightByHash ¶
func (*IndexDB) GetConfirmHeightByHash ¶
func (*IndexDB) GetLatestAccountBlock ¶
func (*IndexDB) GetLatestSnapshotBlockLocation ¶
func (*IndexDB) GetOnRoadHashList ¶
func (*IndexDB) GetRangeSnapshotBlockLocations ¶
func (*IndexDB) GetReceivedBySend ¶
func (*IndexDB) GetSnapshotBlockByHeight ¶
func (*IndexDB) GetSnapshotBlockHeight ¶
func (*IndexDB) GetSnapshotBlockLocation ¶
func (*IndexDB) GetSnapshotBlockLocationByHash ¶
func (*IndexDB) GetSnapshotBlockLocationList ¶
func (*IndexDB) GetSnapshotBlockLocationListByHeight ¶
func (*IndexDB) GetStatus ¶
func (iDB *IndexDB) GetStatus() []interfaces.DBStatus
func (*IndexDB) HasAccount ¶
func (*IndexDB) InitAccountId ¶
func (iDB *IndexDB) InitAccountId()
func (*IndexDB) InsertAccountBlock ¶
func (iDB *IndexDB) InsertAccountBlock(accountBlock *ledger.AccountBlock) error
func (*IndexDB) InsertSnapshotBlock ¶
func (iDB *IndexDB) InsertSnapshotBlock(snapshotBlock *ledger.SnapshotBlock, confirmedBlocks []*ledger.AccountBlock, snapshotBlockLocation *chain_file_manager.Location, abLocationsList map[types.Hash]*chain_file_manager.Location)
hash -> height、 height -> blockDB location、confirmed、 account block height -> blockDB location
func (*IndexDB) IsAccountBlockExisted ¶
func (*IndexDB) IsReceived ¶
func (*IndexDB) IsSnapshotBlockExisted ¶
func (*IndexDB) IterateAccounts ¶
func (*IndexDB) LoadAllHash ¶
func (*IndexDB) LoadRange ¶ added in v2.11.3
func (iDB *IndexDB) LoadRange(addrList []types.Address, loadFn interfaces.LoadOnroadFn) error
func (*IndexDB) RollbackAccountBlocks ¶
func (iDB *IndexDB) RollbackAccountBlocks(accountBlocks []*ledger.AccountBlock) error
rollback account blocks
func (*IndexDB) RollbackSnapshotBlocks ¶
func (iDB *IndexDB) RollbackSnapshotBlocks(deletedSnapshotSegments []*ledger.SnapshotChunk, unconfirmedBlocks []*ledger.AccountBlock) error
rollback snapshot blocks
Click to show internal directories.
Click to hide internal directories.