Documentation
¶
Index ¶
- type BlockStore
- func (bki *BlockStore) Best() (int64, types.Hash)
- func (bki *BlockStore) Close() error
- func (bki *BlockStore) Get(blkHash types.Hash) (*types.Block, error)
- func (bki *BlockStore) GetByHeight(height int64) (*types.Block, error)
- func (bki *BlockStore) GetTx(txHash types.Hash) (int64, []byte, error)
- func (bki *BlockStore) Have(hash types.Hash) bool
- func (bki *BlockStore) HaveTx(txHash types.Hash) bool
- func (bki *BlockStore) PreFetch(blkid types.Hash) (bool, func())
- func (bki *BlockStore) Store(blk *types.Block) error
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockStore ¶
type BlockStore struct {
// contains filtered or unexported fields
}
func NewBlockStore ¶
func NewBlockStore(dir string, opts ...Option) (*BlockStore, error)
func (*BlockStore) Close ¶
func (bki *BlockStore) Close() error
func (*BlockStore) GetByHeight ¶
func (bki *BlockStore) GetByHeight(height int64) (*types.Block, error)
GetByHeight retrieves the full block based on the block height.
Click to show internal directories.
Click to hide internal directories.