Documentation ¶
Index ¶
- func GetBlock(db dbm.DB, hash *bc.Hash) (*types.Block, error)
- func SaveUtxoView(batch dbm.Batch, view *state.UtxoViewpoint) error
- type Store
- func (s *Store) BlockExist(hash *bc.Hash) bool
- func (s *Store) GetBlock(hash *bc.Hash) (*types.Block, error)
- func (s *Store) GetStoreStatus() *protocol.BlockStoreState
- func (s *Store) GetTransactionStatus(hash *bc.Hash) (*bc.TransactionStatus, error)
- func (s *Store) GetTransactionsUtxo(view *state.UtxoViewpoint, txs []*bc.Tx) error
- func (s *Store) GetUtxo(hash *bc.Hash) (*storage.UtxoEntry, error)
- func (s *Store) LoadBlockIndex(stateBestHeight uint64) (*state.BlockIndex, error)
- func (s *Store) SaveBlock(block *types.Block, ts *bc.TransactionStatus) error
- func (s *Store) SaveChainStatus(node *state.BlockNode, view *state.UtxoViewpoint) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SaveUtxoView ¶ added in v1.0.9
func SaveUtxoView(batch dbm.Batch, view *state.UtxoViewpoint) error
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
A Store encapsulates storage for blockchain validation. It satisfies the interface protocol.Store, and provides additional methods for querying current data.
func (*Store) BlockExist ¶
BlockExist check if the block is stored in disk
func (*Store) GetStoreStatus ¶
func (s *Store) GetStoreStatus() *protocol.BlockStoreState
GetStoreStatus return the BlockStoreStateJSON
func (*Store) GetTransactionStatus ¶
GetTransactionStatus will return the utxo that related to the block hash
func (*Store) GetTransactionsUtxo ¶
GetTransactionsUtxo will return all the utxo that related to the input txs
func (*Store) LoadBlockIndex ¶ added in v1.0.9
func (s *Store) LoadBlockIndex(stateBestHeight uint64) (*state.BlockIndex, error)
func (*Store) SaveChainStatus ¶
SaveChainStatus save the core's newest status && delete old status
Click to show internal directories.
Click to hide internal directories.