mirror of
https://github.com/hinto-janai/cuprate.git
synced 2025-01-19 01:04:32 +00:00
get_fee_estimate
This commit is contained in:
parent
d7fef15cd6
commit
1e0ab56a5e
2 changed files with 14 additions and 6 deletions
|
@ -600,14 +600,18 @@ async fn get_version(
|
||||||
|
|
||||||
/// <https://github.com/monero-project/monero/blob/cc73fe71162d564ffda8e549b79a350bca53c454/src/rpc/core_rpc_server.cpp#L3015-L3031>
|
/// <https://github.com/monero-project/monero/blob/cc73fe71162d564ffda8e549b79a350bca53c454/src/rpc/core_rpc_server.cpp#L3015-L3031>
|
||||||
async fn get_fee_estimate(
|
async fn get_fee_estimate(
|
||||||
state: CupratedRpcHandler,
|
mut state: CupratedRpcHandler,
|
||||||
request: GetFeeEstimateRequest,
|
request: GetFeeEstimateRequest,
|
||||||
) -> Result<GetFeeEstimateResponse, Error> {
|
) -> Result<GetFeeEstimateResponse, Error> {
|
||||||
|
let estimate =
|
||||||
|
blockchain_context::fee_estimate(&mut state.blockchain_context, request.grace_blocks)
|
||||||
|
.await?;
|
||||||
|
|
||||||
Ok(GetFeeEstimateResponse {
|
Ok(GetFeeEstimateResponse {
|
||||||
base: AccessResponseBase::ok(),
|
base: AccessResponseBase::ok(),
|
||||||
fee: todo!(),
|
fee: estimate.fee,
|
||||||
fees: todo!(),
|
fees: estimate.fees,
|
||||||
quantization_mask: todo!(),
|
quantization_mask: estimate.quantization_mask,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1143,8 +1143,12 @@ define_request_and_response! {
|
||||||
get_fee_estimate,
|
get_fee_estimate,
|
||||||
cc73fe71162d564ffda8e549b79a350bca53c454 =>
|
cc73fe71162d564ffda8e549b79a350bca53c454 =>
|
||||||
core_rpc_server_commands_defs.h => 2250..=2277,
|
core_rpc_server_commands_defs.h => 2250..=2277,
|
||||||
GetFeeEstimate (empty),
|
|
||||||
Request {},
|
GetFeeEstimate,
|
||||||
|
|
||||||
|
Request {
|
||||||
|
grace_blocks: u64 = default_zero::<u64>(), "default_zero",
|
||||||
|
},
|
||||||
|
|
||||||
#[doc = serde_doc_test!(
|
#[doc = serde_doc_test!(
|
||||||
GET_FEE_ESTIMATE_RESPONSE => GetFeeEstimateResponse {
|
GET_FEE_ESTIMATE_RESPONSE => GetFeeEstimateResponse {
|
||||||
|
|
Loading…
Reference in a new issue