From 7b13439ea0b601e514fdbdf13a193c1c7e7b9400 Mon Sep 17 00:00:00 2001 From: aniketfuryrocks Date: Mon, 27 Mar 2023 16:54:24 +0530 Subject: [PATCH] random memo for each tx --- bench/src/helpers.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/bench/src/helpers.rs b/bench/src/helpers.rs index dcec19dc..5b8ac882 100644 --- a/bench/src/helpers.rs +++ b/bench/src/helpers.rs @@ -69,13 +69,15 @@ impl BenchHelper { funded_payer: &Keypair, blockhash: Hash, ) -> Vec { - let random_bytes: Vec = Alphanumeric - .sample_iter(rand::thread_rng()) - .take(10) - .collect(); - (0..num_of_txs) - .map(|_| Self::create_memo_tx(&random_bytes, funded_payer, blockhash)) + .map(|_| { + let random_bytes: Vec = Alphanumeric + .sample_iter(rand::thread_rng()) + .take(10) + .collect(); + + Self::create_memo_tx(&random_bytes, funded_payer, blockhash) + }) .collect() }