From 418f5e08f8060ce8dc6cd5eae0fd6c78306d2bbd Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Wed, 15 Jun 2022 15:43:24 -0400 Subject: [PATCH] updates --- state/indexer/sink/pubsub/wrapper.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/state/indexer/sink/pubsub/wrapper.go b/state/indexer/sink/pubsub/wrapper.go index 0d0f66eaf..c24f9c87e 100644 --- a/state/indexer/sink/pubsub/wrapper.go +++ b/state/indexer/sink/pubsub/wrapper.go @@ -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) }