kv

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2017 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 TxIndex

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

TxIndex is the simplest possible indexer, backed by Key-Value storage (levelDB). It can only index transaction by its identifier.

func NewTxIndex

func NewTxIndex(store db.DB) *TxIndex

NewTxIndex returns new instance of TxIndex.

func (*TxIndex) AddBatch

func (txi *TxIndex) AddBatch(b *txindex.Batch) error

AddBatch writes a batch of transactions into the TxIndex storage.

func (*TxIndex) Get

func (txi *TxIndex) Get(hash []byte) (*types.TxResult, error)

Get gets transaction from the TxIndex storage and returns it or nil if the transaction is not found.

Jump to

Keyboard shortcuts

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