Skip to content

Commit 931ac6f

Browse files
committed
Merge bitcoin/bitcoin#27914: feerate: For GetFeePerK() return nSatoshisPerK instead of round trip through GetFee
11d6500 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 11d6500 Tree-SHA512: bec1a0d4b572a0c810cf7eb4e97d729d67e96835c2d576a909f755b053a9707c2f1b3df9adb8f08a9c4d310cdbb8b1e1b42b9c004bd1ade02a07d8ce9e902138
2 parents 8847497 + 11d6500 commit 931ac6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/policy/feerate.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class CFeeRate
6262
/**
6363
* Return the fee in satoshis for a vsize of 1000 vbytes
6464
*/
65-
CAmount GetFeePerK() const { return GetFee(1000); }
65+
CAmount GetFeePerK() const { return nSatoshisPerK; }
6666
friend bool operator<(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK < b.nSatoshisPerK; }
6767
friend bool operator>(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK > b.nSatoshisPerK; }
6868
friend bool operator==(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK == b.nSatoshisPerK; }

0 commit comments

Comments
 (0)