4 "github.com/vapor/database/storage"
5 "github.com/vapor/protocol/bc"
6 "github.com/vapor/protocol/bc/types"
7 "github.com/vapor/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(uint64) (*state.BlockIndex, error)
21 SaveBlock(*types.Block, *bc.TransactionStatus) error
22 SaveChainStatus(*state.BlockNode, *state.UtxoViewpoint) error
24 IsWithdrawSpent(hash *bc.Hash) bool
25 SetWithdrawSpent(hash *bc.Hash)
28 // BlockStoreState represents the core's db status
29 type BlockStoreState struct {