File tree Expand file tree Collapse file tree 1 file changed +10
-13
lines changed
crates/flashblocks-rpc/src/tests Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -203,19 +203,16 @@ mod tests {
203203 . await
204204 . expect ( "able to build block" ) ;
205205 let target_block_number = previous_tip + 1 ;
206- for _ in 0 ..10 {
207- if let Some ( block) = self
208- . provider
209- . block ( BlockHashOrNumber :: Number ( target_block_number) )
210- . expect ( "able to load block" )
211- {
212- return block
213- . try_into_recovered ( )
214- . expect ( "able to recover newly built block" ) ;
215- }
216- sleep ( Duration :: from_millis ( SLEEP_TIME ) ) . await ;
217- }
218- panic ! ( "new canonical block not found after building payload" ) ;
206+
207+ let block = self
208+ . provider
209+ . block ( BlockHashOrNumber :: Number ( target_block_number) )
210+ . expect ( "able to load block" )
211+ . expect ( "new canonical block should be available after building payload" ) ;
212+
213+ block
214+ . try_into_recovered ( )
215+ . expect ( "able to recover newly built block" )
219216 }
220217
221218 async fn new_canonical_block ( & mut self , user_transactions : Vec < OpTransactionSigned > ) {
You can’t perform that action at this time.
0 commit comments