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
442 B

  1. package null
  2. import (
  3. "errors"
  4. "github.com/tendermint/tendermint/state/txindex"
  5. "github.com/tendermint/tendermint/types"
  6. )
  7. // TxIndex acts as a /dev/null.
  8. type TxIndex struct{}
  9. // Tx panics.
  10. func (txi *TxIndex) Get(hash []byte) (*types.TxResult, error) {
  11. return nil, errors.New(`Indexing is disabled (set 'tx_index = "kv"' in config)`)
  12. }
  13. // Batch returns nil.
  14. func (txi *TxIndex) AddBatch(batch *txindex.Batch) error {
  15. return nil
  16. }