RPC: Add getFeeCalculatorForBlockhash method call (#8687)

Returns the `FeeCalculator` associated with the given blockhash, or
`null` if said blockhash has expired
This commit is contained in:
Trent Nelson
2020-03-06 17:01:31 -07:00
committed by GitHub
parent 3eb00ef60f
commit 4db074a5aa
9 changed files with 184 additions and 6 deletions

View File

@ -137,6 +137,10 @@ impl SyncClient for BankClient {
Ok(self.bank.last_blockhash_with_fee_calculator())
}
fn get_fee_calculator_for_blockhash(&self, blockhash: &Hash) -> Result<Option<FeeCalculator>> {
Ok(self.bank.get_fee_calculator(blockhash))
}
fn get_fee_rate_governor(&self) -> Result<FeeRateGovernor> {
Ok(self.bank.get_fee_rate_governor().clone())
}