mirror of
https://github.com/tendermint/tendermint.git
synced 2026-04-12 11:46:59 +00:00
updates
This commit is contained in:
@@ -22,6 +22,10 @@ type BlockIndexer struct {
|
||||
sink *EventSink
|
||||
}
|
||||
|
||||
func NewBlockIndexer(sink *EventSink) *BlockIndexer {
|
||||
return &BlockIndexer{sink: sink}
|
||||
}
|
||||
|
||||
func (bi *BlockIndexer) Has(_ int64) (bool, error) {
|
||||
return false, errors.New("the Has method is not supported for the Pubsub indexer")
|
||||
}
|
||||
@@ -40,6 +44,10 @@ type TxIndexer struct {
|
||||
sink *EventSink
|
||||
}
|
||||
|
||||
func NewTxIndexer(sink *EventSink) *TxIndexer {
|
||||
return &TxIndexer{sink: sink}
|
||||
}
|
||||
|
||||
func (ti *TxIndexer) AddBatch(batch *txindex.Batch) error {
|
||||
return ti.sink.IndexTxs(batch.Ops)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user