diff options
author | fanquake <fanquake@gmail.com> | 2023-06-26 09:38:34 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2023-06-26 09:43:38 +0100 |
commit | 931ac6f8368fb279c8b8b5bb9fcf4b95be2a6c56 (patch) | |
tree | 5ddcf5a6a59bbaba8047a383c9893b7cb921df98 /src/policy | |
parent | 8847497161741052f27c4f8fb19a1a88238008f2 (diff) | |
parent | 11d650060aed25273d860baa4e03168a778832bb (diff) | |
download | bitcoin-931ac6f8368fb279c8b8b5bb9fcf4b95be2a6c56.tar.xz |
Merge bitcoin/bitcoin#27914: feerate: For GetFeePerK() return nSatoshisPerK instead of round trip through GetFee
11d650060aed25273d860baa4e03168a778832bb feerate: For GetFeePerK() return nSatoshisPerK instead of round trip through GetFee (Andrew Chow)
Pull request description:
Returning the sats/kvb does not need to round trip through GetFee(1000) since the feerate is already stored as sats/kvb.
Fixes #27913, although this does bring up a larger question of how we should handle such large feerates in fuzzing.
ACKs for top commit:
furszy:
Code ACK 11d65006
Tree-SHA512: bec1a0d4b572a0c810cf7eb4e97d729d67e96835c2d576a909f755b053a9707c2f1b3df9adb8f08a9c4d310cdbb8b1e1b42b9c004bd1ade02a07d8ce9e902138
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; } |