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.
pull/27914/head
Andrew Chow 1 year ago
parent 8f40271037
commit 11d650060a

@ -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; }

Loading…
Cancel
Save