Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IndexedStore ¶
type IndexedStore interface { state.Store // BlockByIndex returns the block that corresponds to the given state index. BlockByIndex(uint32) (state.Block, error) // StateByIndex returns the chain state corresponding to the given state index StateByIndex(uint32) (state.State, error) }
IndexedStore augments a Store with functions to search blocks by index.
func New ¶
func New(s state.Store) IndexedStore
New returns an IndexedStore implemented by getting the blockinfo from the latest state.
func NewFake ¶
func NewFake(s state.Store) IndexedStore
NewFake returns an implementation of IndexedStore that searches blocks by traversing the chain from the latest block.
Click to show internal directories.
Click to hide internal directories.