@@ -468,23 +468,23 @@ async fn live_indexing_stream(
468468 let from_block = current_filter. from_block ( ) ;
469469 if from_block > safe_block_number {
470470 if reorg_safe_distance. is_zero ( ) {
471- let block_distance = latest_block_number - from_block ;
471+ let block_distance = from_block - latest_block_number ;
472472 let is_outside_reorg_range = block_distance
473473 > reorg_safe_distance_for_chain ( cached_provider. chain . id ( ) ) ;
474474
475475 // it should never get under normal conditions outside the reorg range,
476476 // therefore, we log an error as means RCP state is not in sync with the blockchain
477477 if is_outside_reorg_range {
478478 error ! (
479- "{} - {} - LIVE INDEXING STEAM - RPC has gone back on latest block: rpc returned {}, last seen: {}" ,
479+ "{} - {} - LIVE INDEXING STREAM - RPC has gone back on latest block: rpc returned {}, last seen: {}" ,
480480 info_log_name,
481481 IndexingEventProgressStatus :: Live . log( ) ,
482482 latest_block_number,
483483 from_block
484484 ) ;
485485 } else {
486486 info ! (
487- "{} - {} - LIVE INDEXING STEAM - RPC has gone back on latest block: rpc returned {}, last seen: {}" ,
487+ "{} - {} - LIVE INDEXING STREAM - RPC has gone back on latest block: rpc returned {}, last seen: {}" ,
488488 info_log_name,
489489 IndexingEventProgressStatus :: Live . log( ) ,
490490 latest_block_number,
@@ -493,7 +493,7 @@ async fn live_indexing_stream(
493493 }
494494 } else {
495495 info ! (
496- "{} - {} - LIVE INDEXING STEAM - not in safe reorg block range yet block: {} > range: {}" ,
496+ "{} - {} - LIVE INDEXING STREAM - not in safe reorg block range yet block: {} > range: {}" ,
497497 info_log_name,
498498 IndexingEventProgressStatus :: Live . log( ) ,
499499 from_block,
0 commit comments