diff --git a/binaries/cuprated/src/rpc/json.rs b/binaries/cuprated/src/rpc/json.rs index 5bed13c..3bc5bed 100644 --- a/binaries/cuprated/src/rpc/json.rs +++ b/binaries/cuprated/src/rpc/json.rs @@ -600,14 +600,18 @@ async fn get_version( /// async fn get_fee_estimate( - state: CupratedRpcHandler, + mut state: CupratedRpcHandler, request: GetFeeEstimateRequest, ) -> Result { + let estimate = + blockchain_context::fee_estimate(&mut state.blockchain_context, request.grace_blocks) + .await?; + Ok(GetFeeEstimateResponse { base: AccessResponseBase::ok(), - fee: todo!(), - fees: todo!(), - quantization_mask: todo!(), + fee: estimate.fee, + fees: estimate.fees, + quantization_mask: estimate.quantization_mask, }) } diff --git a/rpc/types/src/json.rs b/rpc/types/src/json.rs index fd9ffa3..f0846d3 100644 --- a/rpc/types/src/json.rs +++ b/rpc/types/src/json.rs @@ -1143,8 +1143,12 @@ define_request_and_response! { get_fee_estimate, cc73fe71162d564ffda8e549b79a350bca53c454 => core_rpc_server_commands_defs.h => 2250..=2277, - GetFeeEstimate (empty), - Request {}, + + GetFeeEstimate, + + Request { + grace_blocks: u64 = default_zero::(), "default_zero", + }, #[doc = serde_doc_test!( GET_FEE_ESTIMATE_RESPONSE => GetFeeEstimateResponse {