Skip to content

Commit 11d6500

Browse files
committed
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.
1 parent 8f40271 commit 11d6500

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/policy/feerate.h

Lines changed: 1 addition & 1 deletion
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)