Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions massa-node/src/operation_injector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ pub fn start_operation_injector(
.next()
.unwrap()
.clone();
let mut distant_wallets = vec![KeyPair::generate(0).unwrap(); 32];
let mut wallets_created = vec![false; 32];
let mut distant_wallets = vec![KeyPair::generate(0).unwrap(); THREAD_COUNT as usize];
let mut wallets_created = vec![false; THREAD_COUNT as usize];
let mut init_ops = vec![];
while wallets_created.iter().any(|e| *e == false) {
let keypair = KeyPair::generate(0).unwrap();
Expand Down Expand Up @@ -81,7 +81,7 @@ pub fn start_operation_injector(
loop {
let now = std::time::Instant::now();
let mut storage = storage.clone_without_refs();
let txps = nb_op / 32;
let txps = nb_op / (THREAD_COUNT as u64);
let final_slot = get_closest_slot_to_timestamp(
THREAD_COUNT,
T0,
Expand All @@ -90,7 +90,7 @@ pub fn start_operation_injector(
);
let mut ops = vec![];

for i in 0..32 {
for i in 0..(THREAD_COUNT as usize) {
for _ in 0..txps {
let amount = rng.gen_range(1..=10000);
let content = Operation {
Expand Down