Some checks are pending
docker-build-cometbft / vars (push) Waiting to run
docker-build-cometbft / build-images (amd64, ubuntu-24.04) (push) Blocked by required conditions
docker-build-cometbft / build-images (arm64, ubuntu-24.04-arm) (push) Blocked by required conditions
docker-build-cometbft / merge-images (push) Blocked by required conditions
docker-build-e2e-node / vars (push) Waiting to run
docker-build-e2e-node / build-images (amd64, ubuntu-24.04) (push) Blocked by required conditions
docker-build-e2e-node / build-images (arm64, ubuntu-24.04-arm) (push) Blocked by required conditions
docker-build-e2e-node / merge-images (push) Blocked by required conditions
31 lines
742 B
Go
31 lines
742 B
Go
package null
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
|
|
"github.com/cometbft/cometbft/libs/log"
|
|
"github.com/cometbft/cometbft/libs/pubsub/query"
|
|
"github.com/cometbft/cometbft/state/indexer"
|
|
"github.com/cometbft/cometbft/types"
|
|
)
|
|
|
|
var _ indexer.BlockIndexer = (*BlockerIndexer)(nil)
|
|
|
|
// TxIndex implements a no-op block indexer.
|
|
type BlockerIndexer struct{}
|
|
|
|
func (idx *BlockerIndexer) Has(int64) (bool, error) {
|
|
return false, errors.New(`indexing is disabled (set 'tx_index = "kv"' in config)`)
|
|
}
|
|
|
|
func (idx *BlockerIndexer) Index(types.EventDataNewBlockEvents) error {
|
|
return nil
|
|
}
|
|
|
|
func (idx *BlockerIndexer) Search(context.Context, *query.Query) ([]int64, error) {
|
|
return []int64{}, nil
|
|
}
|
|
|
|
func (idx *BlockerIndexer) SetLogger(log.Logger) {
|
|
}
|