random memo for each tx

This commit is contained in:
aniketfuryrocks 2023-03-27 16:54:24 +05:30
parent 6352b23847
commit 7b13439ea0
No known key found for this signature in database
GPG Key ID: FA6BFCFAA7D4B764
1 changed files with 8 additions and 6 deletions

View File

@ -69,13 +69,15 @@ impl BenchHelper {
funded_payer: &Keypair,
blockhash: Hash,
) -> Vec<Transaction> {
let random_bytes: Vec<u8> = 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<u8> = Alphanumeric
.sample_iter(rand::thread_rng())
.take(10)
.collect();
Self::create_memo_tx(&random_bytes, funded_payer, blockhash)
})
.collect()
}