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
40 lines
976 B
Go
40 lines
976 B
Go
package null
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
|
|
"git.cw.tr/mukan-network/mukan-consensus/libs/log"
|
|
|
|
abci "git.cw.tr/mukan-network/mukan-consensus/abci/types"
|
|
"git.cw.tr/mukan-network/mukan-consensus/libs/pubsub/query"
|
|
"git.cw.tr/mukan-network/mukan-consensus/state/txindex"
|
|
)
|
|
|
|
var _ txindex.TxIndexer = (*TxIndex)(nil)
|
|
|
|
// TxIndex acts as a /dev/null.
|
|
type TxIndex struct{}
|
|
|
|
// Get on a TxIndex is disabled and panics when invoked.
|
|
func (txi *TxIndex) Get(_ []byte) (*abci.TxResult, error) {
|
|
return nil, errors.New(`indexing is disabled (set 'tx_index = "kv"' in config)`)
|
|
}
|
|
|
|
// AddBatch is a noop and always returns nil.
|
|
func (txi *TxIndex) AddBatch(_ *txindex.Batch) error {
|
|
return nil
|
|
}
|
|
|
|
// Index is a noop and always returns nil.
|
|
func (txi *TxIndex) Index(_ *abci.TxResult) error {
|
|
return nil
|
|
}
|
|
|
|
func (txi *TxIndex) Search(_ context.Context, _ *query.Query) ([]*abci.TxResult, error) {
|
|
return []*abci.TxResult{}, nil
|
|
}
|
|
|
|
func (txi *TxIndex) SetLogger(log.Logger) {
|
|
|
|
}
|