Remove blockhash from fee calculation (#20641)

This commit is contained in:
Jack May
2021-10-13 13:10:58 -07:00
committed by GitHub
parent 149d224557
commit da45be366a
21 changed files with 53 additions and 119 deletions

View File

@ -896,10 +896,7 @@ pub fn generate_and_fund_keypairs<T: 'static + Client + Send + Sync>(
)],
None,
);
let blockhash = client.get_latest_blockhash().unwrap();
let max_fee = client
.get_fee_for_message(&blockhash, &single_sig_message)
.unwrap();
let max_fee = client.get_fee_for_message(&single_sig_message).unwrap();
let extra_fees = extra * max_fee;
let total_keypairs = keypairs.len() as u64 + 1; // Add one for funding keypair
let total = lamports_per_account * total_keypairs + extra_fees;