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

package null
import (
"context"
"errors"
"github.com/tendermint/tendermint/internal/pubsub/query"
"github.com/tendermint/tendermint/internal/state/indexer"
"github.com/tendermint/tendermint/types"
)
var _ indexer.BlockIndexer = (*BlockerIndexer)(nil)
// TxIndex implements a no-op block indexer.
type BlockerIndexer struct{}
func (idx *BlockerIndexer) Has(height int64) (bool, error) {
return false, errors.New(`indexing is disabled (set 'tx_index = "kv"' in config)`)
}
func (idx *BlockerIndexer) Index(types.EventDataNewBlockHeader) error {
return nil
}
func (idx *BlockerIndexer) Search(ctx context.Context, q *query.Query) ([]int64, error) {
return []int64{}, nil
}