From 11d650060aed25273d860baa4e03168a778832bb Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Mon, 19 Jun 2023 14:36:14 -0400 Subject: [PATCH] feerate: For GetFeePerK() return nSatoshisPerK instead of round trip through GetFee Returning the sats/kvb does not need to round trip through GetFee(1000) since the feerate is already stored as sats/kvb. --- src/policy/feerate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/policy/feerate.h b/src/policy/feerate.h index 6f859e2d0de..41f4a4d06bd 100644 --- a/src/policy/feerate.h +++ b/src/policy/feerate.h @@ -62,7 +62,7 @@ public: /** * Return the fee in satoshis for a vsize of 1000 vbytes */ - CAmount GetFeePerK() const { return GetFee(1000); } + CAmount GetFeePerK() const { return nSatoshisPerK; } friend bool operator<(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK < b.nSatoshisPerK; } friend bool operator>(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK > b.nSatoshisPerK; } friend bool operator==(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK == b.nSatoshisPerK; }