Documentation
¶
Index ¶
- func DecodeMainchain(data []byte) (map[uint64]*bc.Hash, error)
- func DecodeSnapshot(data []byte) (*state.Snapshot, 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) GetSnapshot(hash *bc.Hash) (*state.Snapshot, error)
- func (s *Store) GetStoreStatus() BlockStoreStateJSON
- func (s *Store) SaveBlock(block *legacy.Block) error
- func (s *Store) SaveMainchain(mainchain map[uint64]*bc.Hash, hash *bc.Hash) error
- func (s *Store) SaveSnapshot(snapshot *state.Snapshot, hash *bc.Hash) error
- func (s *Store) SaveStoreStatus(height uint64, hash *bc.Hash)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeMainchain ¶ added in v0.1.4
DecodeMainchain decodes a Mainchain from bytes
func DecodeSnapshot ¶
DecodeSnapshot decodes a snapshot from bytes
Types ¶
type BlockStoreStateJSON ¶
func (BlockStoreStateJSON) Save ¶
func (bsj BlockStoreStateJSON) Save(db dbm.DB)
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) GetMainchain ¶ added in v0.1.4
func (*Store) GetStoreStatus ¶ added in v0.1.4
func (s *Store) GetStoreStatus() BlockStoreStateJSON
func (*Store) SaveMainchain ¶ added in v0.1.4
func (*Store) SaveSnapshot ¶
SaveSnapshot saves a state snapshot to the database.
Click to show internal directories.
Click to hide internal directories.