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

@ -730,10 +730,9 @@ fn check_payer_balances(
) -> Result<(), Error> {
let mut undistributed_tokens: u64 = allocations.iter().map(|x| x.amount).sum();
let blockhash = client.get_latest_blockhash()?;
let fees = messages
.iter()
.map(|message| client.get_fee_for_message(&blockhash, message))
.map(|message| client.get_fee_for_message(message))
.collect::<Result<Vec<_>, _>>()
.unwrap()
.iter()

View File

@ -97,10 +97,9 @@ pub fn check_spl_token_balances(
.expect("spl_token_args must be some");
let allocation_amount: u64 = allocations.iter().map(|x| x.amount).sum();
let blockhash = client.get_latest_blockhash()?;
let fees: u64 = messages
.iter()
.map(|message| client.get_fee_for_message(&blockhash, message))
.map(|message| client.get_fee_for_message(message))
.collect::<Result<Vec<_>, _>>()
.unwrap()
.iter()