You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
640 B

  1. package tx
  2. import (
  3. txindexer "github.com/tendermint/tendermint/state/tx/indexer"
  4. "github.com/tendermint/tendermint/types"
  5. )
  6. // Indexer interface defines methods to index and search transactions.
  7. type Indexer interface {
  8. // Batch analyzes, indexes or stores a batch of transactions.
  9. //
  10. // NOTE We do not specify Index method for analyzing a single transaction
  11. // here because it bears heavy perfomance loses. Almost all advanced indexers
  12. // support batching.
  13. Batch(b *txindexer.Batch) error
  14. // Tx returns specified transaction or nil if the transaction is not indexed
  15. // or stored.
  16. Tx(hash string) (*types.TxResult, error)
  17. }