Skip to content

Commit

Permalink
Repay transactions from test accounts to client
Browse files Browse the repository at this point in the history
  • Loading branch information
CriesofCarrots authored and garious committed Jul 12, 2018
1 parent 3de979a commit aa4f30c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/bin/client-demo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,15 @@ fn generate_and_send_txs(
println!("Signing transactions... {}", txs,);
let signing_start = Instant::now();

let transactions: Vec<_> = keypairs
let mut transactions: Vec<_> = keypairs
.par_iter()
.map(|keypair| Transaction::new(&id.keypair(), keypair.pubkey(), 1, *last_id))
.collect();
let mut transactions1: Vec<_> = keypairs
.par_iter()
.map(|keypair| Transaction::new(keypair, id.pubkey(), 1, *last_id))
.collect();
transactions.append(&mut transactions1);

let duration = signing_start.elapsed();
let ns = duration.as_secs() * 1_000_000_000 + u64::from(duration.subsec_nanos());
Expand Down Expand Up @@ -251,7 +256,7 @@ fn main() {
let rnd = GenKeys::new(seed);

println!("Creating keypairs...");
let keypairs = rnd.gen_n_keypairs(txs);
let keypairs = rnd.gen_n_keypairs(txs / 2);

let first_count = client.transaction_count();
println!("initial count {}", first_count);
Expand Down

0 comments on commit aa4f30c

Please sign in to comment.