Skip to content

Commit 30c2b41

Browse files
committed
Move currentBlockTxEvents variable outside the for-loop and fix typo
1 parent d5e8423 commit 30c2b41

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

services/ingestion/sealing_verifier.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ func (v *SealingVerifier) backfill(ctx context.Context, height uint64) error {
238238
Msg("backfilling verifier")
239239

240240
startHeight := height
241+
var currentBlockTxEvents []flow.Event
241242
for {
242243
endHeight := startHeight + maxRangeForGetEvents
243244
if endHeight >= sporkRootHeight {
@@ -264,7 +265,6 @@ func (v *SealingVerifier) backfill(ctx context.Context, height uint64) error {
264265
return fmt.Errorf("received unexpected number of events for height range %d-%d: %d != %d", startHeight, endHeight, len(blockEvents), len(txEvents))
265266
}
266267

267-
var currentBlockTxEvents []flow.Event
268268
for i, blockEvent := range blockEvents {
269269
currentBlockTxEvents = append(currentBlockTxEvents, txEvents[i].Events...)
270270

@@ -283,7 +283,7 @@ func (v *SealingVerifier) backfill(ctx context.Context, height uint64) error {
283283
return fmt.Errorf("failed to verify block events for height %d: %w", blockEvent.Height, err)
284284
}
285285

286-
// transactions sucessessfully grouped with a block. reset the list
286+
// transactions successfully grouped with a block. reset the list
287287
currentBlockTxEvents = nil
288288
}
289289

0 commit comments

Comments
 (0)