Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
4597: Ensure there is at least one txn when calling `random_with_specifics()` r=rafal-ch a=rafal-ch

This PR fixes the flakiness in `register_deploys_and_blocks()` test.

When using the `CL_TEST_SEED=66ee5988281c41b543ce58bf618b9c65` it produced 0 additional transactions, which is interpreted by `random_with_specifics()` as "[create an arbitrary number of test transactions for me](https://github.com/casper-network/casper-node/blob/feat-2.0/node/src/types/block/finalized_block.rs#L130-L136)". This was causing a mismatch in the expected number of transactions.

Co-authored-by: Rafał Chabowski <[email protected]>
  • Loading branch information
casperlabs-bors-ng[bot] and Rafał Chabowski authored Mar 11, 2024
2 parents 4ed6f90 + 2bbf37a commit 442dfee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion node/src/components/deploy_buffer/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ fn register_deploys_and_blocks() {

// test if deploys held for proposed blocks which did not get finalized in time
// are eligible again
let count = rng.gen_range(0..11);
let count = rng.gen_range(1..11);
let txns: Vec<_> = std::iter::repeat_with(|| Transaction::Deploy(Deploy::random(&mut rng)))
.take(count)
.collect();
Expand Down

0 comments on commit 442dfee

Please sign in to comment.