store

package
v0.10.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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) Best

func (bki *BlockStore) Best() (int64, types.Hash)

func (*BlockStore) Close

func (bki *BlockStore) Close() error

func (*BlockStore) Get

func (bki *BlockStore) Get(blkHash types.Hash) (*types.Block, error)

func (*BlockStore) GetByHeight

func (bki *BlockStore) GetByHeight(height int64) (*types.Block, error)

GetByHeight retrieves the full block based on the block height.

func (*BlockStore) GetTx

func (bki *BlockStore) GetTx(txHash types.Hash) (int64, []byte, error)

func (*BlockStore) Have

func (bki *BlockStore) Have(hash types.Hash) bool

func (*BlockStore) HaveTx

func (bki *BlockStore) HaveTx(txHash types.Hash) bool

func (*BlockStore) PreFetch

func (bki *BlockStore) PreFetch(blkid types.Hash) (bool, func())

func (*BlockStore) Store

func (bki *BlockStore) Store(blk *types.Block) error

type Option

type Option func(*options)

func WithLogger

func WithLogger(logger log.Logger) Option

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL