RPC: Add getFeeCalculatorForBlockhash method call (#8687) (#8698)

automerge
This commit is contained in:
mergify[bot]
2020-03-06 17:25:33 -08:00
committed by GitHub
parent 659aaafff6
commit ff4731cce2
9 changed files with 184 additions and 6 deletions

View File

@@ -71,6 +71,17 @@ impl GenericRpcClientRequest for MockRpcClientRequest {
serde_json::to_value(FeeCalculator::default()).unwrap(),
),
})?,
RpcRequest::GetFeeCalculatorForBlockhash => {
let value = if self.url == "blockhash_expired" {
Value::Null
} else {
serde_json::to_value(Some(FeeCalculator::default())).unwrap()
};
serde_json::to_value(Response {
context: RpcResponseContext { slot: 1 },
value,
})?
}
RpcRequest::GetFeeRateGovernor => serde_json::to_value(Response {
context: RpcResponseContext { slot: 1 },
value: serde_json::to_value(FeeRateGovernor::default()).unwrap(),