indexer

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: LGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorTxNotFound = errors.New("tx not found")

Functions

This section is empty.

Types

type KVIndexer

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

KVIndexer implements a eth tx indexer on a KV db.

func NewKVIndexer

func NewKVIndexer(logger log.Logger, clientCtx client.Context, cacheSize int) *KVIndexer

NewKVIndexer creates the KVIndexer with a specified cache size

func (*KVIndexer) Close

func (kv *KVIndexer) Close()

Close gracefully shuts down the indexer

func (*KVIndexer) GetByBlockAndIndex

func (kv *KVIndexer) GetByBlockAndIndex(blockNumber int64, txIndex uint) (*bbtypes.TxResult, error)

GetByBlockAndIndex retrieves a transaction result by block number and transaction index

func (*KVIndexer) GetByTxHash

func (kv *KVIndexer) GetByTxHash(hash common.Hash) (*bbtypes.TxResult, error)

GetByTxHash retrieves a transaction result by its hash

func (*KVIndexer) SetBlockAndIndex

func (kv *KVIndexer) SetBlockAndIndex(blockNumber int64, txIndex uint, txRes *bbtypes.TxResult) error

SetBlockAndIndex adds the transaction result to the blockIndexCache with a copy of TxResult

func (*KVIndexer) SetTxHash

func (kv *KVIndexer) SetTxHash(hash common.Hash, txRes *bbtypes.TxResult) error

SetTxHash adds the transaction result to the txCache with a copy of TxResult

Jump to

Keyboard shortcuts

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