Here in the definition of CFeeRate
class is a member called nSatoshisPerK
:
/** * Fee rate in satoshis per kilovirtualbyte: CAmount / kvB */
class CFeeRate
{
private: /** Fee rate in sat/kvB (satoshis per 1000 virtualbytes) */ CAmount nSatoshisPerK;
And its job is obvious according to the comment above. This class has also a member called GetFee
:
CAmount CFeeRate::GetFee(uint32_t num_bytes) const
{ const int64_t nSize{num_bytes}; // Be explicit that we're converting from a double to int64_t (CAmount) here. // We've previously had issues with the silent double->int64_t conversion. CAmount nFee{static_cast<CAmount>(std::ceil(nSatoshisPerK * nSize / 1000.0))}; if (nFee == 0 && nSize != 0) { if (nSatoshisPerK > 0) nFee = CAmount(1); if (nSatoshisPerK < 0) nFee = CAmount(-1); } return nFee;
}
My question is that in which case it is possible for the nSatoshisPerK
to be less than zero? and what does it mean?
You can get bonuses upto $100 FREE BONUS when you:
π° Install these recommended apps:
π² SocialGood - 100% Crypto Back on Everyday Shopping
π² xPortal - The DeFi For The Next Billion
π² CryptoTab Browser - Lightweight, fast, and ready to mine!
π° Register on these recommended exchanges:
π‘ Binanceπ‘ Bitfinexπ‘ Bitmartπ‘ Bittrexπ‘ Bitget
π‘ CoinExπ‘ Crypto.comπ‘ Gate.ioπ‘ Huobiπ‘ Kucoin.
Comments