kv

package
v0.31.5-binance.3 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockIndex

type BlockIndex struct {
	// contains filtered or unexported fields
}

BlockIndex is the simplest possible indexer, backed by key-value storage (levelDB).

func NewBlockIndex

func NewBlockIndex(store dbm.DB, options ...func(*BlockIndex)) *BlockIndex

NewBlockIndex creates new KV indexer.

func (*BlockIndex) Get

func (bki *BlockIndex) Get(hash []byte) (int64, error)

Get gets block height from the BlockIndex storage and returns it or 0 if the block is not found.

func (*BlockIndex) Index

func (bki *BlockIndex) Index(header *types.Header) error

Index indexes a single block header

Jump to

Keyboard shortcuts

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