File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -566,7 +566,8 @@ fn prepare_candidate(
566566 // range. This is to compensate for the gateway's lack of knowledge about which blocks
567567 // indexers have responded with already. All else being equal, indexers closer to chain head
568568 // and with higher success rate will be favored.
569- let range = status. min_block . unwrap_or ( 0 ) ..=( perf. latest_block + blocks_per_minute) ;
569+ let latest_block = status. block . max ( perf. latest_block + blocks_per_minute) ;
570+ let range = status. min_block . unwrap_or ( 0 ) ..=latest_block;
570571 let number_gte = block_requirements. number_gte . unwrap_or ( 0 ) ;
571572 if !range. contains ( min) || !range. contains ( max) || ( * range. end ( ) < number_gte) {
572573 return Err ( IndexerError :: Unavailable ( UnavailableReason :: MissingBlock ) ) ;
You can’t perform that action at this time.
0 commit comments