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) 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() 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) Load(addrList []types.Address) (map[types.Address]map[types.Address][]ledger.HashHeight, error)
- func (iDB *IndexDB) LoadAllHash() (map[types.Address][]types.Hash, 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 Chain ¶
type IndexDB ¶
type IndexDB struct {
// contains filtered or unexported fields
}
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) 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) 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 []*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) Load ¶
func (*IndexDB) LoadAllHash ¶
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.