Update fee api to use blockhash (#21054)

This commit is contained in:
Jack May
2021-10-29 13:52:59 -07:00
committed by GitHub
parent aea3c66fa8
commit bced07a099
16 changed files with 142 additions and 93 deletions

View File

@ -248,7 +248,7 @@ fn run_accounts_bench(
let executor = TransactionExecutor::new(entrypoint_addr);
// Create and close messages both require 2 signatures, fake a 2 signature message to calculate fees
let message = Message::new(
let mut message = Message::new(
&[
Instruction::new_with_bytes(
Pubkey::new_unique(),
@ -270,6 +270,7 @@ fn run_accounts_bench(
latest_blockhash = Instant::now();
}
message.recent_blockhash = blockhash;
let fee = client
.get_fee_for_message(&message)
.expect("get_fee_for_message");