@@ -360,30 +360,30 @@ func (fnb *EVMGatewayNodeBuilder) eventIngestionEngineComponent(cfg config.Confi
360360	l .Info ().Msg ("bootstrap starting event ingestion" )
361361
362362	// 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 )
364364	if  err  !=  nil  {
365365		return  nil , fmt .Errorf ("failed to get latest cadence block: %w" , err )
366366	}
367367
368- 	chainLatestHeight , err  :=  fnb .Storages .Blocks .LatestCadenceHeight ()
368+ 	gatewayLatestHeight , err  :=  fnb .Storages .Blocks .LatestCadenceHeight ()
369369	if  err  !=  nil  {
370370		return  nil , err 
371371	}
372372
373373	// 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 )
375375	if  err  !=  nil  {
376376		return  nil , fmt .Errorf (
377377			"failed to get provided cadence height %d: %w" ,
378- 			chainLatestHeight ,
378+ 			chainLatestBlock . Height ,
379379			err ,
380380		)
381381	}
382382
383383	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 ).
387387		Msg ("indexing cadence height information" )
388388
389389	chainID  :=  cfg .FlowNetworkID 
@@ -394,7 +394,7 @@ func (fnb *EVMGatewayNodeBuilder) eventIngestionEngineComponent(cfg config.Confi
394394		fnb .Client ,
395395		chainID ,
396396		fnb .Keystore ,
397- 		chainLatestHeight ,
397+ 		chainLatestBlock . Height ,
398398	)
399399
400400	callTracerCollector , err  :=  replayer .NewCallTracerCollector (fnb .Logger )
0 commit comments