Versions in this module Expand all Collapse all v1 v1.0.0 May 26, 2022 Changes in this version + var BlockHashesKeyPrefix = []byte + var BlockStoreKey = []byte("blockStore") + var ContractPrefix = []byte + var UtxoKeyPrefix = []byte + func CalcBlockHashesKey(height uint64) []byte + func CalcBlockHeaderKey(hash *bc.Hash) []byte + func CalcBlockTransactionsKey(hash *bc.Hash) []byte + func CalcContractKey(hash [32]byte) []byte + func CalcUtxoKey(hash *bc.Hash) []byte + func GetBlockHashesByHeight(db dbm.DB, height uint64) ([]*bc.Hash, error) + func GetBlockHeader(db dbm.DB, hash *bc.Hash) (*types.BlockHeader, error) + func GetBlockTransactions(db dbm.DB, hash *bc.Hash) ([]*types.Tx, error) + func GetMainChainHash(db dbm.DB, height uint64) (*bc.Hash, error) + func SaveUtxoView(batch dbm.Batch, view *state.UtxoViewpoint) error + type Store struct + func NewStore(db dbm.DB) *Store + func (s *Store) BlockExist(hash *bc.Hash) bool + func (s *Store) CheckpointsFromNode(height uint64, hash *bc.Hash) ([]*state.Checkpoint, error) + func (s *Store) GetBlock(hash *bc.Hash) (*types.Block, error) + func (s *Store) GetBlockHashesByHeight(height uint64) ([]*bc.Hash, error) + func (s *Store) GetBlockHeader(hash *bc.Hash) (*types.BlockHeader, error) + func (s *Store) GetBlockTransactions(hash *bc.Hash) ([]*types.Tx, error) + func (s *Store) GetCheckpoint(hash *bc.Hash) (*state.Checkpoint, error) + func (s *Store) GetCheckpointsByHeight(height uint64) ([]*state.Checkpoint, error) + func (s *Store) GetContract(hash [32]byte) ([]byte, error) + func (s *Store) GetMainChainHash(height uint64) (*bc.Hash, error) + func (s *Store) GetStoreStatus() *state.BlockStoreState + func (s *Store) GetTransactionsUtxo(view *state.UtxoViewpoint, txs []*bc.Tx) error + func (s *Store) GetUtxo(hash *bc.Hash) (*storage.UtxoEntry, error) + func (s *Store) SaveBlock(block *types.Block) error + func (s *Store) SaveBlockHeader(blockHeader *types.BlockHeader) error + func (s *Store) SaveChainStatus(blockHeader *types.BlockHeader, mainBlockHeaders []*types.BlockHeader, ...) error + func (s *Store) SaveCheckpoints(checkpoints []*state.Checkpoint) error