File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -161,11 +161,17 @@ async fn shallow_block_confirmation_does_not_mitigate_reorg() -> anyhow::Result<
161161 // reorg more blocks than the block_confirmation config
162162 provider. anvil_reorg ( ReorgOptions { depth : 8 , tx_block_pairs : vec ! [ ] } ) . await ?;
163163
164- // mint additional blocks to allow the scanner to stream the pre-reorg blocks
165- provider. anvil_mine ( Some ( 3 ) , None ) . await ?;
164+ // mint 1 block to allow the scanner to process reorged blocks (previously streamed + the block
165+ // confirmed now)
166+ provider. anvil_mine ( Some ( 1 ) , None ) . await ?;
166167
167168 assert_next ! ( stream, ScannerStatus :: ReorgDetected ) ;
168- assert_range_coverage ! ( stream, 3 ..=10 ) ;
169+ assert_range_coverage ! ( stream, 3 ..=8 ) ;
170+ let mut stream = assert_empty ! ( stream) ;
171+
172+ // mint additional blocks to allow the scanner to stream all of the pre-reorg blocks
173+ provider. anvil_mine ( Some ( 3 ) , None ) . await ?;
174+ assert_range_coverage ! ( stream, 9 ..=10 ) ;
169175 assert_empty ! ( stream) ;
170176
171177 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments