Skip to content

Commit 10a5b9d

Browse files
committed
Make it a bit more forgiving in logic
Signed-off-by: Jacinta Ferrant <[email protected]>
1 parent b466e50 commit 10a5b9d

File tree

1 file changed

+9
-12
lines changed
  • testnet/stacks-node/src/tests/signer

1 file changed

+9
-12
lines changed

testnet/stacks-node/src/tests/signer/v0.rs

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3096,18 +3096,15 @@ fn tenure_extend_with_other_transactions() {
30963096
)
30973097
.expect("Timed out waiting for a block with a tenure extend");
30983098
let transactions = block["transactions"].as_array().unwrap();
3099-
assert_eq!(
3100-
transactions.len(),
3101-
2,
3102-
"Expected 2 transactions in the block"
3103-
);
3104-
let tx = transactions[1].as_object().unwrap();
3105-
let txid = tx["txid"].as_str().unwrap();
3106-
assert_eq!(
3107-
txid[2..],
3108-
to_find,
3109-
"Expected the transfer tx to be the second transaction in the block"
3110-
);
3099+
assert!(
3100+
transactions.len() > 1,
3101+
"Expected at least 2 transactions in the block"
3102+
);
3103+
assert!(transactions.iter().any(|tx| {
3104+
let tx = tx.as_object().unwrap();
3105+
let txid = tx["txid"].as_str().unwrap();
3106+
txid[2..] == to_find
3107+
}), "Failed to find the transfer tx in the block");
31113108
signer_test.shutdown();
31123109
}
31133110

0 commit comments

Comments
 (0)