Skip to content

Commit 6f5b3c9

Browse files
authored
Merge pull request #853 from onflow/mpeter/update-notify-block-logic
Give blocks a better chance to become sealed before calling `NotifyBlock`
2 parents 7575806 + 8b80fd0 commit 6f5b3c9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

services/ingestion/block_tracking_subscriber.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,10 @@ func (r *RPCBlockTrackingSubscriber) subscribe(ctx context.Context, height uint6
229229
// but calling `NotifyBlock` might fail if the AN has not actually
230230
// finished syncing all collections.
231231
// Hence, we keep a small queue of the incoming block headers, so
232-
// that we can call `NotifyBlock` on block N-5, where N is the
232+
// that we can call `NotifyBlock` on block N-15, where N is the
233233
// height of the current block header. This will give enough time
234234
// for the block to be sealed.
235-
if len(blockHeadersQueue) > 5 {
235+
if len(blockHeadersQueue) > 15 {
236236
earliestBlockHeader := blockHeadersQueue[0]
237237
r.keyLock.NotifyBlock(earliestBlockHeader)
238238

0 commit comments

Comments
 (0)