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.

51 lines
1.1 KiB

  1. package null
  2. import (
  3. "context"
  4. abci "github.com/tendermint/tendermint/abci/types"
  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.EventSink = (*EventSink)(nil)
  10. // EventSink implements a no-op indexer.
  11. type EventSink struct{}
  12. func NewEventSink() indexer.EventSink {
  13. return &EventSink{}
  14. }
  15. func (nes *EventSink) Type() indexer.EventSinkType {
  16. return indexer.NULL
  17. }
  18. func (nes *EventSink) IndexBlockEvents(bh types.EventDataNewBlockHeader) error {
  19. return nil
  20. }
  21. func (nes *EventSink) IndexTxEvents(results []*abci.TxResult) error {
  22. return nil
  23. }
  24. func (nes *EventSink) SearchBlockEvents(ctx context.Context, q *query.Query) ([]int64, error) {
  25. return nil, nil
  26. }
  27. func (nes *EventSink) SearchTxEvents(ctx context.Context, q *query.Query) ([]*abci.TxResult, error) {
  28. return nil, nil
  29. }
  30. func (nes *EventSink) GetTxByHash(hash []byte) (*abci.TxResult, error) {
  31. return nil, nil
  32. }
  33. func (nes *EventSink) HasBlock(h int64) (bool, error) {
  34. return false, nil
  35. }
  36. func (nes *EventSink) Stop() error {
  37. return nil
  38. }