File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed
Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -614,6 +614,7 @@ impl<N: Network> Service<N> {
614614 info ! ( batch_count = batch_count, "Rewind completed" ) ;
615615 }
616616
617+ /// Assumes that `stream_start <= next_start_block <= end`.
617618 async fn stream_historical_blocks (
618619 stream_start : BlockNumber ,
619620 mut next_start_block : BlockNumber ,
@@ -625,8 +626,6 @@ impl<N: Network> Service<N> {
625626 ) -> Option < N :: BlockResponse > {
626627 let mut batch_count = 0 ;
627628
628- // must be <= to include the edge case when start == end (i.e. return the single block
629- // range)
630629 loop {
631630 let batch_end_num = next_start_block. saturating_add ( max_block_range - 1 ) . min ( end) ;
632631 let batch_end = match provider. get_block_by_number ( batch_end_num. into ( ) ) . await {
You can’t perform that action at this time.
0 commit comments