Skip to content

Commit 723299f

Browse files
committed
Remove redundant fetching of block header prior to SubscribeBlockHeadersFromStartHeight
1 parent e7406e4 commit 723299f

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

services/ingestion/block_tracking_subscriber.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,6 @@ func (r *RPCBlockTrackingSubscriber) Subscribe(ctx context.Context) <-chan model
110110
func (r *RPCBlockTrackingSubscriber) subscribe(ctx context.Context, height uint64) <-chan models.BlockEvents {
111111
eventsChan := make(chan models.BlockEvents)
112112

113-
_, err := r.client.GetBlockHeaderByHeight(ctx, height)
114-
if err != nil {
115-
err = fmt.Errorf("failed to subscribe for events, the block height %d doesn't exist: %w", height, err)
116-
eventsChan <- models.NewBlockEventsError(err)
117-
return eventsChan
118-
}
119-
120113
blockHeadersChan, errChan, err := r.client.SubscribeBlockHeadersFromStartHeight(
121114
ctx,
122115
height,

0 commit comments

Comments
 (0)