One less alloc per transaction (#9705)

* One less alloc per transaction

* Fix benches

* Fix compiler warnings in bench build

* Fix move build

* Fix bench
This commit is contained in:
Greg Fitzgerald
2020-04-24 13:03:46 -06:00
committed by GitHub
parent 767a0f9384
commit 76b1c2baf0
24 changed files with 95 additions and 106 deletions

View File

@@ -1506,7 +1506,7 @@ pub mod tests {
);
let vote_tx = Transaction::new_signed_instructions(
&[&leader_vote_keypair],
vec![vote_ix],
&[vote_ix],
Hash::default(),
);
let shreds = entries_to_test_shreds(
@@ -2777,7 +2777,7 @@ pub mod tests {
let transaction = Transaction::new_signed_instructions(
&[&alice, &alice_vote_keypair],
instructions,
&instructions,
bank.last_blockhash(),
);
bank.process_transaction(&transaction)
@@ -2807,7 +2807,7 @@ pub mod tests {
bank.freeze();
// Votes
let instructions = vec![
let instructions = [
vote_instruction::vote(
&leader_vote_keypair.pubkey(),
&leader_vote_keypair.pubkey(),
@@ -2835,7 +2835,7 @@ pub mod tests {
));
let transaction = Transaction::new_signed_with_payer(
instructions,
&instructions,
Some(&alice.pubkey()),
&[&alice, &leader_vote_keypair, &alice_vote_keypair],
bank.last_blockhash(),