From afaaa7859d1a045345caa0b8d9bfc708beb60b71 Mon Sep 17 00:00:00 2001 From: Eval EXEC Date: Sun, 4 Aug 2024 09:01:56 +0800 Subject: [PATCH] Support RPC GetFeeRateStatistics --- rpc/client.go | 3 +++ types/chain.go | 2 ++ 2 files changed, 5 insertions(+) diff --git a/rpc/client.go b/rpc/client.go index 97a8aac5..5e309caf 100644 --- a/rpc/client.go +++ b/rpc/client.go @@ -101,6 +101,9 @@ type Client interface { // GetFeeRateStatics Returns the fee_rate statistics of confirmed blocks on the chain GetFeeRateStatics(ctx context.Context, target interface{}) (*types.FeeRateStatics, error) + // GetFeeRateStatistics Returns the fee_rate statistics of confirmed blocks on the chain + GetFeeRateStatistics(ctx context.Context, target interface{}) (*types.FeeRAteStatistics, error) + ////// Experiment // DryRunTransaction dry run transaction and return the execution cycles. // This method will not check the transaction validity, diff --git a/types/chain.go b/types/chain.go index f92ca0d3..d038ec03 100644 --- a/types/chain.go +++ b/types/chain.go @@ -331,6 +331,8 @@ type FeeRateStatics struct { Median uint64 `json:"median"` } +type FeeRAteStatistics = FeeRateStatics + type TransactionAndWitnessProof struct { BlockHash Hash `json:"block_hash"` TransactionsProof *Proof `json:"transactions_proof"`