@@ -1676,7 +1676,6 @@ fn simple_neon_integration() {
1676
1676
}
1677
1677
1678
1678
#[ test]
1679
- #[ ignore]
1680
1679
/// This test spins up a nakamoto-neon node.
1681
1680
/// It starts in Epoch 2.0, mines with `neon_node` to Epoch 3.0,
1682
1681
/// having flash blocks when epoch updates and expects everything to work normally,
@@ -1900,15 +1899,35 @@ fn simple_neon_integration_with_flash_blocks_on_epoch_3() {
1900
1899
assert ! ( tip. stacks_block_height >= block_height_pre_3_0 + 30 ) ;
1901
1900
1902
1901
// Check that we have the expected burn blocks
1903
- // We expect to have blocks 220-230 and 234 onwards, with a gap for the flash blocks
1902
+ // We expect to have around the blocks 220-230 and 234 onwards, with a gap of 3 blocks for the flash blocks
1904
1903
let bhh = u64:: from ( tip. burn_header_height ) ;
1905
- test_observer:: contains_burn_block_range ( 220 ..=230 ) . unwrap ( ) ;
1906
- test_observer:: contains_burn_block_range ( 234 ..=bhh) . unwrap ( ) ;
1907
- // Verify that we're missing the expected flash blocks
1908
- assert ! (
1909
- test_observer:: contains_burn_block_range( 231 ..=233 ) . is_err( ) ,
1910
- "Expected to be missing burn blocks 231-233 due to flash blocks"
1904
+ // Find the gap in burn blocks
1905
+ let mut gap_start = 0 ;
1906
+ let mut gap_end = 0 ;
1907
+ for i in 220 ..=bhh {
1908
+ if test_observer:: contains_burn_block_range ( i..=i) . is_err ( ) {
1909
+ if gap_start == 0 {
1910
+ gap_start = i;
1911
+ }
1912
+ gap_end = i;
1913
+ } else if gap_start != 0 {
1914
+ break ;
1915
+ }
1916
+ }
1917
+
1918
+ // Verify that there's a gap of exactly 3 blocks
1919
+ assert_eq ! (
1920
+ gap_end - gap_start + 1 ,
1921
+ 3 ,
1922
+ "Expected a gap of exactly 3 burn blocks due to flash blocks, found gap from {} to {}" ,
1923
+ gap_start,
1924
+ gap_end
1911
1925
) ;
1926
+
1927
+ // Verify blocks before and after the gap
1928
+ test_observer:: contains_burn_block_range ( 220 ..=( gap_start - 1 ) ) . unwrap ( ) ;
1929
+ test_observer:: contains_burn_block_range ( ( gap_end + 1 ) ..=bhh) . unwrap ( ) ;
1930
+
1912
1931
info ! ( "Verified burn block ranges, including expected gap for flash blocks" ) ;
1913
1932
1914
1933
coord_channel
0 commit comments