diff --git a/crates/cli/src/commands/spam.rs b/crates/cli/src/commands/spam.rs index cf64437..ee2393b 100644 --- a/crates/cli/src/commands/spam.rs +++ b/crates/cli/src/commands/spam.rs @@ -59,8 +59,7 @@ pub async fn spam( let mut agents = AgentStore::new(); let signers_per_period = args .txs_per_block - .unwrap_or(args.txs_per_second.unwrap_or(spam.len())) - / spam.len(); + .unwrap_or(args.txs_per_second.unwrap_or(spam.len())); let mut all_signers = vec![]; all_signers.extend_from_slice(&user_signers); diff --git a/crates/cli/src/util.rs b/crates/cli/src/util.rs index 3fe8eb9..616399f 100644 --- a/crates/cli/src/util.rs +++ b/crates/cli/src/util.rs @@ -77,6 +77,9 @@ pub fn get_spam_pools(testconfig: &TestConfig) -> Vec { } } + // filter out non-unique pools + from_pools.sort(); + from_pools.dedup(); from_pools }