minedtx

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MinedTxHandler

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

MinedTxHandler manages the storage of mined trasactions with indexing

func NewMinedTxHandler

func NewMinedTxHandler() *MinedTxHandler

NewMinedTxHandler creates a new MinedTxHandler object

func (*MinedTxHandler) Add

func (mt *MinedTxHandler) Add(txn *badger.Txn, height uint32, txs []*objs.Tx) error

Add adds txs at height to MinedTxHandler

func (*MinedTxHandler) Delete

func (mt *MinedTxHandler) Delete(txn *badger.Txn, txHashes [][]byte) error

Delete removes txs corresponding to txHashes from MinedTxHandler

func (*MinedTxHandler) Get

func (mt *MinedTxHandler) Get(txn *badger.Txn, txHashes [][]byte) ([]*objs.Tx, [][]byte, error)

Get retrieves txs as well as any txHashes which are missing

func (*MinedTxHandler) GetHeightForTx

func (mt *MinedTxHandler) GetHeightForTx(txn *badger.Txn, txHash []byte) (uint32, error)

GetHeightForTx returns height for a given txHash

Jump to

Keyboard shortcuts

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