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.

27 lines
685 B

  1. package null
  2. import (
  3. "context"
  4. "errors"
  5. "github.com/tendermint/tendermint/internal/pubsub/query"
  6. "github.com/tendermint/tendermint/internal/state/indexer"
  7. "github.com/tendermint/tendermint/types"
  8. )
  9. var _ indexer.BlockIndexer = (*BlockerIndexer)(nil)
  10. // TxIndex implements a no-op block indexer.
  11. type BlockerIndexer struct{}
  12. func (idx *BlockerIndexer) Has(height int64) (bool, error) {
  13. return false, errors.New(`indexing is disabled (set 'tx_index = "kv"' in config)`)
  14. }
  15. func (idx *BlockerIndexer) Index(types.EventDataNewBlockHeader) error {
  16. return nil
  17. }
  18. func (idx *BlockerIndexer) Search(ctx context.Context, q *query.Query) ([]int64, error) {
  19. return []int64{}, nil
  20. }