@@ -3279,9 +3279,6 @@ fn forked_tenure_is_ignored() {
3279
3279
// Unpause the broadcast of Tenure B's block, do not submit commits.
3280
3280
TEST_SKIP_COMMIT_OP . lock ( ) . unwrap ( ) . replace ( true ) ;
3281
3281
TEST_BROADCAST_STALL . lock ( ) . unwrap ( ) . replace ( false ) ;
3282
- let block_tenure_b = NakamotoChainState :: get_canonical_block_header ( chainstate. db ( ) , & sortdb)
3283
- . unwrap ( )
3284
- . unwrap ( ) ;
3285
3282
3286
3283
// Wait for a stacks block to be broadcasted
3287
3284
let start_time = Instant :: now ( ) ;
@@ -3293,6 +3290,10 @@ fn forked_tenure_is_ignored() {
3293
3290
thread:: sleep ( Duration :: from_secs ( 1 ) ) ;
3294
3291
}
3295
3292
3293
+ let block_tenure_b = NakamotoChainState :: get_canonical_block_header ( chainstate. db ( ) , & sortdb)
3294
+ . unwrap ( )
3295
+ . unwrap ( ) ;
3296
+
3296
3297
info ! ( "Tenure B broadcasted a block. Issue the next bitcon block and unstall block commits." ) ;
3297
3298
3298
3299
info ! ( "Starting tenure C." ) ;
@@ -3312,14 +3313,14 @@ fn forked_tenure_is_ignored() {
3312
3313
. unwrap ( )
3313
3314
. unwrap ( ) ;
3314
3315
3316
+ assert_ne ! ( block_tenure_b, block_tenure_a) ;
3315
3317
assert_ne ! ( block_tenure_b, block_tenure_c) ;
3316
- // TODO: I don't understand this. Shouldn't it be also one block past block tenure a's block height? Why is it the same as block tenure A's height?
3318
+ // Block B was built atop block A
3317
3319
assert_eq ! (
3318
3320
block_tenure_b. stacks_block_height,
3319
- block_tenure_a. stacks_block_height
3321
+ block_tenure_a. stacks_block_height + 1
3320
3322
) ;
3321
- // Block C was built AFTER block A, but before block B, so it should be built off of block A
3322
- // therefore it will be one ahead of its block height
3323
+ // Block C was built AFTER Block B was built, but BEFORE it was broadcasted, so it should be built off of Block A
3323
3324
assert_eq ! (
3324
3325
block_tenure_c. stacks_block_height,
3325
3326
block_tenure_a. stacks_block_height + 1
0 commit comments