@@ -360,30 +360,30 @@ func (fnb *EVMGatewayNodeBuilder) eventIngestionEngineComponent(cfg config.Confi
360
360
l .Info ().Msg ("bootstrap starting event ingestion" )
361
361
362
362
// get latest cadence block from the network and the database
363
- gatewayLatestBlock , err := fnb .Client .GetLatestBlock (context .Background (), true )
363
+ chainLatestBlock , err := fnb .Client .GetLatestBlock (context .Background (), true )
364
364
if err != nil {
365
365
return nil , fmt .Errorf ("failed to get latest cadence block: %w" , err )
366
366
}
367
367
368
- chainLatestHeight , err := fnb .Storages .Blocks .LatestCadenceHeight ()
368
+ gatewayLatestHeight , err := fnb .Storages .Blocks .LatestCadenceHeight ()
369
369
if err != nil {
370
370
return nil , err
371
371
}
372
372
373
373
// make sure the provided block to start the indexing can be loaded
374
- _ , err = fnb .Client .GetBlockHeaderByHeight (context .Background (), chainLatestHeight )
374
+ _ , err = fnb .Client .GetBlockHeaderByHeight (context .Background (), chainLatestBlock . Height )
375
375
if err != nil {
376
376
return nil , fmt .Errorf (
377
377
"failed to get provided cadence height %d: %w" ,
378
- chainLatestHeight ,
378
+ chainLatestBlock . Height ,
379
379
err ,
380
380
)
381
381
}
382
382
383
383
l .Info ().
384
- Uint64 ("chain-cadence-height" , chainLatestHeight ).
385
- Uint64 ("gateway-cadence-height" , gatewayLatestBlock . Height ).
386
- Uint64 ("missed-heights" , gatewayLatestBlock .Height - chainLatestHeight ).
384
+ Uint64 ("chain-cadence-height" , chainLatestBlock . Height ).
385
+ Uint64 ("gateway-cadence-height" , gatewayLatestHeight ).
386
+ Uint64 ("missed-heights" , chainLatestBlock .Height - gatewayLatestHeight ).
387
387
Msg ("indexing cadence height information" )
388
388
389
389
chainID := cfg .FlowNetworkID
@@ -394,7 +394,7 @@ func (fnb *EVMGatewayNodeBuilder) eventIngestionEngineComponent(cfg config.Confi
394
394
fnb .Client ,
395
395
chainID ,
396
396
fnb .Keystore ,
397
- chainLatestHeight ,
397
+ chainLatestBlock . Height ,
398
398
)
399
399
400
400
callTracerCollector , err := replayer .NewCallTracerCollector (fnb .Logger )
0 commit comments