@@ -40,11 +40,11 @@ where
4040 debug ! ( logger, "Creating data stream" ;
4141 "from_block" => cx. latest_synced_block( ) . unwrap_or( BlockNumber :: MIN ) ,
4242 "to_block" => latest_block,
43- "start_block" => cx. min_start_block ( ) ,
43+ "start_block" => cx. start_block ( ) ,
4444 "max_block_range" => max_block_range,
4545 ) ;
4646
47- // State: (latest_queried_block, max_end_block , is_first)
47+ // State: (latest_queried_block, end_block , is_first)
4848 let initial_state = ( cx. latest_synced_block ( ) , BlockNumber :: MIN , true ) ;
4949
5050 stream:: unfold (
@@ -132,12 +132,12 @@ fn build_data_stream<E>(
132132 table_ptrs : Arc < [ TablePtr ] > ,
133133 buffer_size : usize ,
134134 stopwatch : & StopwatchMetrics ,
135- min_start_block : BlockNumber ,
135+ start_block : BlockNumber ,
136136) -> BoxStream < ' static , Result < ( RecordBatchGroups , Arc < [ TablePtr ] > ) , Error > >
137137where
138138 E : std:: error:: Error + IsDeterministic + Send + Sync + ' static ,
139139{
140- let mut min_start_block_checked = false ;
140+ let mut start_block_checked = false ;
141141 let mut load_first_record_batch_group_section =
142142 Some ( stopwatch. start_section ( "load_first_record_batch_group" ) ) ;
143143
@@ -151,14 +151,14 @@ where
151151
152152 match result {
153153 Ok ( response) => {
154- if !min_start_block_checked {
154+ if !start_block_checked {
155155 if let Some ( ( ( first_block, _) , _) ) = response. 0 . first_key_value ( ) {
156- if * first_block < min_start_block {
156+ if * first_block < start_block {
157157 return Err ( Error :: NonDeterministic ( anyhow ! ( "chain reorg" ) ) ) ;
158158 }
159159 }
160160
161- min_start_block_checked = true ;
161+ start_block_checked = true ;
162162 }
163163
164164 Ok ( response)
0 commit comments