Documentation ¶
Index ¶
- Constants
- func GetNonce(txStore *TxIndex, address string) (uint64, error)
- func GetPod(txStore *TxIndex, podNumber int) ([][]byte, error)
- func IncrementPodCount(txi *TxIndex) error
- func IncrementTxCount(txi *TxIndex) error
- func InitiateDatabaseForPods(txi *TxIndex) error
- func ParseEventSeqFromEventKey(key []byte) (int64, error)
- func RetrievePodCount(txStore *TxIndex) (int, error)
- func RetrieveTxCount(txStore *TxIndex) (int, error)
- func SetNonce(txStore *TxIndex, address string, nonce uint64) error
- func SetPod(txStore *TxIndex, podNumber int, pod [][]byte) error
- func SetTxCount(txStore *TxIndex, count int) error
- func StorePod(txi *TxIndex, b *txindex.Batch) error
- type HeightInfo
- type TxIndex
- func (txi *TxIndex) AddBatch(b *txindex.Batch) error
- func (txi *TxIndex) AddPod(b *txindex.Batch) error
- func (txi *TxIndex) Get(hash []byte) (*abci.TxResult, error)
- func (txi *TxIndex) GetbytedataFortracks(hash []byte) ([]byte, error)
- func (txi *TxIndex) Index(result *abci.TxResult) error
- func (txi *TxIndex) Search(ctx context.Context, q *query.Query) ([]*abci.TxResult, error)
- func (txi *TxIndex) SetLogger(l log.Logger)
Constants ¶
const ( CounterTxsKey = "countTxs" CounterPodsKey = "countPods" )
Variables ¶
This section is empty.
Functions ¶
func IncrementPodCount ¶
func IncrementTxCount ¶
func InitiateDatabaseForPods ¶
func RetrievePodCount ¶
func RetrieveTxCount ¶
func SetTxCount ¶
Types ¶
type HeightInfo ¶
type HeightInfo struct {
// contains filtered or unexported fields
}
type TxIndex ¶
type TxIndex struct {
// contains filtered or unexported fields
}
TxIndex is the simplest possible indexer, backed by key-value storage (levelDB).
func (*TxIndex) AddBatch ¶
AddBatch indexes a batch of transactions using the given list of events. Each key that indexed from the tx's events is a composite of the event type and the respective attribute's key delimited by a "." (eg. "account.number"). Any event with an empty type is not indexed.
func (*TxIndex) Get ¶
Get gets transaction from the TxIndex storage and returns it or nil if the transaction is not found.
func (*TxIndex) GetbytedataFortracks ¶
func (*TxIndex) Index ¶
Index indexes a single transaction using the given list of events. Each key that indexed from the tx's events is a composite of the event type and the respective attribute's key delimited by a "." (eg. "account.number"). Any event with an empty type is not indexed.
If a transaction is indexed with the same hash as a previous transaction, it will be overwritten unless the tx result was NOT OK and the prior result was OK i.e. more transactions that successfully executed overwrite transactions that failed or successful yet older transactions.