Skip to content

Commit 02d595c

Browse files
committed
test: fix tests::nakamoto_integrations::continue_tenure_extend
1 parent 2272b8f commit 02d595c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

testnet/stacks-node/src/tests/nakamoto_integrations.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7206,7 +7206,9 @@ fn continue_tenure_extend() {
72067206
let mut tenure_block_founds = vec![];
72077207
let mut transfer_tx_included = false;
72087208
let mut last_block_had_extend = false;
7209-
for block in test_observer::get_blocks() {
7209+
for pair in test_observer::get_blocks().windows(2) {
7210+
let prev_block = &pair[0];
7211+
let block = &pair[1];
72107212
let mut has_extend = false;
72117213
for tx in block["transactions"].as_array().unwrap() {
72127214
let raw_tx = tx["raw_tx"].as_str().unwrap();
@@ -7227,8 +7229,10 @@ fn continue_tenure_extend() {
72277229
tenure_extends.push(parsed);
72287230
}
72297231
TenureChangeCause::BlockFound => {
7230-
if last_block_had_extend {
7231-
panic!("Expected a Nakamoto block to happen after tenure extend block");
7232+
if last_block_had_extend
7233+
&& prev_block["transactions"].as_array().unwrap().len() <= 1
7234+
{
7235+
panic!("Expected other transactions to happen after tenure extend");
72327236
}
72337237
tenure_block_founds.push(parsed);
72347238
}

0 commit comments

Comments
 (0)