MultiversX Tracker is Live!

In which situation the fee rate can be negative and what does it really mean?

Bitcoin Stack Exchange

Bitcoin News / Bitcoin Stack Exchange 168 Views

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?


Get BONUS $200 for FREE!

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