diff options
author | Andrew Chow <github@achow101.com> | 2023-06-19 14:36:14 -0400 |
---|---|---|
committer | Andrew Chow <github@achow101.com> | 2023-06-19 14:36:14 -0400 |
commit | 11d650060aed25273d860baa4e03168a778832bb (patch) | |
tree | 0bb595ba376c8b9947db814e9b8ef5361190b5a2 /src/policy | |
parent | 8f402710371a40c5777dc3f9c4ba6ca8505a2f90 (diff) | |
download | bitcoin-11d650060aed25273d860baa4e03168a778832bb.tar.xz |
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.
Diffstat (limited to 'src/policy')
-rw-r--r-- | src/policy/feerate.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/policy/feerate.h b/src/policy/feerate.h index 6f859e2d0d..41f4a4d06b 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; } |