Documentation ¶
Index ¶
- Variables
- func BatchSaveWaterline(dbase db.Database, linesMap map[common.ChainID]common.Height) error
- func CheckBlockExist(dbase db.Database, height common.Height) ([]byte, bool)
- func GetBlockHash(dbase db.Database, height common.Height) ([]byte, error)
- func GetCccTxIndex(dbase db.Database, hashOfVcc []byte) (hashOfTx []byte, err error)
- func GetChainCommittee(dbase db.Database, chainID common.ChainID, epochNum common.EpochNum) (*models.Committee, error)
- func GetChainHeightHeader(dbase db.Database, chainID common.ChainID, height common.Height) (*models.HeaderSummary, error)
- func GetChainHeightHeaderSummary(dbase db.Database, chainID common.ChainID, height common.Height) (*models.HeaderSummary, error)
- func GetDeltaFrom(dbase db.Database, fromID common.ChainID, height common.Height) (ok bool, deltas []*models.AccountDelta, err error)
- func GetTxIndex(dbase db.Database, txHash []byte) (*models.TXIndex, error)
- func LoadBlock(dbase db.Database, hashOfHeader []byte) (*models.BlockEMessage, error)
- func LoadBlockCursor(dbase db.Database) (common.Height, []byte, error)
- func LoadDeltaFromPoolMaxHeightLocked(dbase db.Database, fromID common.ChainID) (common.Height, bool)
- func LoadDeltaFroms(olddb db.Database, chainid common.ChainID, shardInfo common.ShardInfo) []*models.ShardDeltaMessage
- func LoadEpochCommittee(dbase db.Database, chainId common.ChainID, epoch common.EpochNum) (*models.EpochCommittee, error)
- func LoadFirstRewardCursor(dbase db.Database) (common.Height, []byte, error)
- func LoadRRTrieRoot(dbase db.Database, era common.EraNum) ([]byte, error)
- func LoadReportCursor(dbase db.Database, chainId common.ChainID) (height common.Height, hashOfBlock []byte, exist bool, err error)
- func LoadStorageEntries(dbase db.Database, root common.Hash, num int) ([]models.EntryHashHash, error)
- func LoadToBeSent(dbase db.Database) (common.Height, bool)
- func LoadUnverifiedBlock(dbase db.Database, height common.Height) (*models.BlockEMessage, error)
- func LoadWaterlineLocked(dbase db.Database, fromID common.ChainID) (common.Height, bool)
- func PreloadDeltaFromLocked(dbase db.Database, fromID common.ChainID, height common.Height) bool
- func RemoveStorageEntries(dbase db.Database, root common.Hash, num int) error
- func SaveBlock(dbase db.Database, hashOfHeader []byte, block *models.BlockEMessage) (int, error)
- func SaveBlockCursor(dbase db.Database, chainID common.ChainID, height common.Height, ...) error
- func SaveBlockSummary(dbase db.Database, hds []*models.BlockSummary) error
- func SaveBlockTxIndexs(dbase db.Database, block *models.BlockEMessage) (count int, err error)
- func SaveCccTxIndex(dbase db.Database, hashOfVcc []byte, hashOfTx []byte) error
- func SaveChainCommittee(dbase db.Database, chainID common.ChainID, epochNum common.EpochNum, ...) error
- func SaveChainHeightHeaders(dbase db.Database, chainId common.ChainID, parentId common.ChainID, ...) error
- func SaveDeltaFromPoolMaxHeightLocked(dbase db.Database, fromID common.ChainID, maxHeight common.Height) error
- func SaveDeltaFromToDB(dbase db.Database, fromID common.ChainID, height common.Height, ...) error
- func SaveEpochCommittee(dbase db.Writer, chainId common.ChainID, nextEpoch common.EpochNum, ...) error
- func SaveFirstRewardCursor(dbase db.Database, height common.Height, hashOfBlock []byte) error
- func SaveHeaderIndexes(dbase db.Database, header *models.BlockHeader) (hashOfHeader []byte, err error)
- func SaveNextCommittee(dbase db.Database, chainId common.ChainID, nextEpoch common.EpochNum, ...) error
- func SaveRRTrieRoot(dbase db.Database, era common.EraNum, rootOfRRTrie []byte) error
- func SaveReportCursor(dbase db.Database, chainId common.ChainID, height common.Height, ...) error
- func SaveToBeSent(dbase db.Database, toBeSent common.Height) error
- func SaveUnverifiedBlock(dbase db.Database, height common.Height, block *models.BlockEMessage) error
- func SaveWaterlineLocked(dbase db.Database, fromID common.ChainID, waterline common.Height) error
- func SaveWaterlinesSnapshots(dbase db.Database, how []byte, waterlines models.Waterlines) error
- func SetCursorManually(dbase db.Database, id common.ChainID, to common.Height) error
- func StoreStorageEntries(dbase db.Database, root common.Hash, num int, entries []models.EntryHashHash) error
Constants ¶
This section is empty.
Variables ¶
var ( TryRpcGetBlock func(chain models.DataHolder, h common.Height) (ret *models.BlockEMessage, err error) RpcReplayBlock func(target string, request *models.SyncRequest, holder models.DataHolder, end common.Height, logger logrus.FieldLogger) RpcGetRRProof func(rewardChainInfo *common.ChainInfos, rrRoot []byte, logger logrus.FieldLogger) (*models.RRProofs, error) )
Functions ¶
func BatchSaveWaterline ¶
func GetCccTxIndex ¶
func GetChainCommittee ¶
func GetChainCommittee(dbase db.Database, chainID common.ChainID, epochNum common.EpochNum) (*models.Committee, error)
Get Chain Epoch Committee
func GetChainHeightHeader ¶
func GetChainHeightHeader(dbase db.Database, chainID common.ChainID, height common.Height) (*models.HeaderSummary, error)
Gets the HDS information of the specified block confirmed by the main chain, including the block header of the main chain containing the block header (chainid + height) and the packed sub chain block header information (HDS)
func GetChainHeightHeaderSummary ¶
func GetChainHeightHeaderSummary(dbase db.Database, chainID common.ChainID, height common.Height) (*models.HeaderSummary, error)
Gets the block header and sub chain block header information contained in the block specified by chainid+height
func GetDeltaFrom ¶
func LoadDeltaFroms ¶
func LoadDeltaFroms(olddb db.Database, chainid common.ChainID, shardInfo common.ShardInfo) []*models.ShardDeltaMessage
func LoadEpochCommittee ¶
func LoadEpochCommittee(dbase db.Database, chainId common.ChainID, epoch common.EpochNum) (*models.EpochCommittee, error)
func LoadFirstRewardCursor ¶
func LoadReportCursor ¶
func LoadStorageEntries ¶
func LoadToBeSent ¶
func LoadUnverifiedBlock ¶
func LoadUnverifiedBlock(dbase db.Database, height common.Height) (*models.BlockEMessage, error)
func LoadWaterlineLocked ¶
func PreloadDeltaFromLocked ¶
func RemoveStorageEntries ¶
func SaveBlockCursor ¶
func SaveBlockCursor(dbase db.Database, chainID common.ChainID, height common.Height, hashOfHeader []byte) error
Block Cursor
func SaveBlockSummary ¶
func SaveBlockSummary(dbase db.Database, hds []*models.BlockSummary) error
Record the block height cursors of all the children chains that have been packaged and confirmed on the parent chain (current is the parent chain)
func SaveBlockTxIndexs ¶
Save transation index in the block
func SaveCccTxIndex ¶
func SaveChainCommittee ¶
func SaveChainCommittee(dbase db.Database, chainID common.ChainID, epochNum common.EpochNum, committee *models.Committee) error
Save Chain Epoch Committee
func SaveChainHeightHeaders ¶
func SaveChainHeightHeaders(dbase db.Database, chainId common.ChainID, parentId common.ChainID, block *models.BlockEMessage) error
Save all cursors of children chains which have been recorded on parent(reported to) chain (current is one of children chains) chainId: current chain id parentId: chain id reported to block: block of parent chain
func SaveDeltaFromToDB ¶
func SaveDeltaFromToDB(dbase db.Database, fromID common.ChainID, height common.Height, deltas []*models.AccountDelta) error
func SaveEpochCommittee ¶
func SaveEpochCommittee(dbase db.Writer, chainId common.ChainID, nextEpoch common.EpochNum, ec *models.EpochCommittee) error
func SaveFirstRewardCursor ¶
func SaveHeaderIndexes ¶
func SaveNextCommittee ¶
func SaveRRTrieRoot ¶
func SaveReportCursor ¶
func SaveToBeSent ¶
func SaveUnverifiedBlock ¶
func SaveUnverifiedBlock(dbase db.Database, height common.Height, block *models.BlockEMessage) error
func SaveWaterlineLocked ¶
func SaveWaterlinesSnapshots ¶
func SetCursorManually ¶
func StoreStorageEntries ¶
Types ¶
This section is empty.