mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 14:53:43 +01:00
policy: optional FeeEstimateMode param to CFeeRate::ToString
This commit is contained in:
@@ -35,7 +35,10 @@ CAmount CFeeRate::GetFee(size_t nBytes_) const
|
||||
return nFee;
|
||||
}
|
||||
|
||||
std::string CFeeRate::ToString() const
|
||||
std::string CFeeRate::ToString(const FeeEstimateMode& fee_estimate_mode) const
|
||||
{
|
||||
return strprintf("%d.%08d %s/kB", nSatoshisPerK / COIN, nSatoshisPerK % COIN, CURRENCY_UNIT);
|
||||
switch (fee_estimate_mode) {
|
||||
case FeeEstimateMode::SAT_B: return strprintf("%d.%03d %s/B", nSatoshisPerK / 1000, nSatoshisPerK % 1000, CURRENCY_ATOM);
|
||||
default: return strprintf("%d.%08d %s/kB", nSatoshisPerK / COIN, nSatoshisPerK % COIN, CURRENCY_UNIT);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user