4 "github.com/bytom/database/storage"
5 "github.com/bytom/protocol/bc"
6 "github.com/bytom/protocol/bc/types"
7 "github.com/bytom/protocol/state"
10 // Store provides storage interface for blockchain data
11 type Store interface {
12 BlockExist(*bc.Hash) bool
14 GetBlock(*bc.Hash) (*types.Block, error)
15 GetStoreStatus() *BlockStoreState
16 GetTransactionStatus(*bc.Hash) (*bc.TransactionStatus, error)
17 GetTransactionsUtxo(*state.UtxoViewpoint, []*bc.Tx) error
18 GetUtxo(*bc.Hash) (*storage.UtxoEntry, error)
20 LoadBlockIndex() (*state.BlockIndex, error)
21 SaveBlock(*types.Block, *bc.TransactionStatus) error
22 SaveChainStatus(*state.BlockNode, *state.UtxoViewpoint) error
25 // BlockStoreState represents the core's db status
26 type BlockStoreState struct {