diff --git a/bench/Cargo.toml b/bench/Cargo.toml index dd1934af..d5571df2 100644 --- a/bench/Cargo.toml +++ b/bench/Cargo.toml @@ -15,5 +15,5 @@ clap = { version = "4.1.6", features = ["derive"] } tokio = { version = "1.25.0", features = ["full", "fs"]} tracing-subscriber = "0.3.16" dirs = "4.0.0" -uuid = { version = "1.3.0", features = ["v4"] } +rand = "0.8.5" diff --git a/bench/src/helpers.rs b/bench/src/helpers.rs index 575791ce..dcec19dc 100644 --- a/bench/src/helpers.rs +++ b/bench/src/helpers.rs @@ -1,6 +1,7 @@ use std::str::FromStr; use anyhow::Context; +use rand::{distributions::Alphanumeric, prelude::Distribution}; use solana_rpc_client::nonblocking::rpc_client::RpcClient; use solana_sdk::{ commitment_config::CommitmentConfig, @@ -68,9 +69,13 @@ 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) - .into_iter() - .map(|_| Self::create_memo_tx(uuid::Uuid::new_v4().as_bytes(), funded_payer, blockhash)) + .map(|_| Self::create_memo_tx(&random_bytes, funded_payer, blockhash)) .collect() }