From 4a7dd21d4f1e2e6306248847dd3819949bb1eb8e Mon Sep 17 00:00:00 2001 From: zeroXbrock <2791467+zeroXbrock@users.noreply.github.com> Date: Mon, 6 Jan 2025 15:37:37 -0800 Subject: [PATCH] group spam txs by spam step, not account --- crates/core/src/generator/mod.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/core/src/generator/mod.rs b/crates/core/src/generator/mod.rs index cf1ccf7..3a6d522 100644 --- a/crates/core/src/generator/mod.rs +++ b/crates/core/src/generator/mod.rs @@ -234,6 +234,7 @@ where .map(|(_, store)| store.signers.len()) .unwrap_or(1); + // txs will be grouped by account [from=1, from=1, from=1, from=2, from=2, from=2, ...] for idx in 0..num_accts { for step in create_steps.iter() { // lookup placeholder values in DB & update map before templating @@ -271,6 +272,7 @@ where .map(|(_, store)| store.signers.len()) .unwrap_or(1); + // txs will be grouped by account [from=1, from=1, from=1, from=2, from=2, from=2, ...] for i in 0..(num_accts) { for step in setup_steps.iter() { if i > 0 && step.from_pool.is_none() { @@ -351,8 +353,9 @@ where .map(|(_, store)| store.signers.len()) .unwrap_or(1); - for i in 0..(num_txs / num_steps) { - for step in spam_steps.iter() { + // txs will be grouped by step [from=1, from=2, from=3, from=1, from=2, from=3, ...] + for step in spam_steps.iter() { + for i in 0..(num_txs / num_steps) { // converts a FunctionCallDefinition to a NamedTxRequest (filling in fuzzable args), // returns a callback handle and the processed tx request let prepare_tx = |req| {