Documentation ¶
Index ¶
- func DecodeMainchain(data []byte) (map[uint64]*bc.Hash, error)
- func GetBlock(db dbm.DB, hash *bc.Hash) *legacy.Block
- type BlockStoreStateJSON
- type Store
- func (s *Store) BlockExist(hash *bc.Hash) bool
- func (s *Store) GetBlock(hash *bc.Hash) (*legacy.Block, error)
- func (s *Store) GetMainchain(hash *bc.Hash) (map[uint64]*bc.Hash, error)
- func (s *Store) GetStoreStatus() BlockStoreStateJSON
- 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 *legacy.Block) error
- func (s *Store) SaveChainStatus(block *legacy.Block, view *state.UtxoViewpoint, m map[uint64]*bc.Hash) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeMainchain ¶ added in v0.1.4
DecodeMainchain decodes a Mainchain from bytes
Types ¶
type BlockStoreStateJSON ¶
BlockStoreStateJSON represents the core's db status
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 ¶ added in v0.1.4
BlockExist check if the block is stored in disk
func (*Store) GetMainchain ¶ added in v0.1.4
GetMainchain read the mainchain map from db
func (*Store) GetStoreStatus ¶ added in v0.1.4
func (s *Store) GetStoreStatus() BlockStoreStateJSON
GetStoreStatus return the BlockStoreStateJSON
func (*Store) GetTransactionsUtxo ¶ added in v0.3.0
GetTransactionsUtxo will return all the utxo that related to the input txs
Click to show internal directories.
Click to hide internal directories.