Fix some fee logic: (RIPD-614)

* fee_default sets cost in drops of reference transaction
* Offline signing uses fee_default
* Signing multiplier maximum works correctly
* Fix bugs in load fee track
* Remove dead code, add comments
This commit is contained in:
JoelKatz
2014-10-01 11:35:05 -07:00
committed by Nik Bougalis
parent a0dbbb2d84
commit b651e0146d
7 changed files with 28 additions and 24 deletions

View File

@@ -2018,7 +2018,7 @@ void Ledger::updateFees ()
if (mBaseFee)
return;
std::uint64_t baseFee = getConfig ().FEE_DEFAULT;
std::uint32_t referenceFeeUnits = 10;
std::uint32_t referenceFeeUnits = getConfig ().TRANSACTION_FEE_BASE;
std::uint32_t reserveBase = getConfig ().FEE_ACCOUNT_RESERVE;
std::int64_t reserveIncrement = getConfig ().FEE_OWNER_RESERVE;
@@ -2054,6 +2054,7 @@ void Ledger::updateFees ()
std::uint64_t Ledger::scaleFeeBase (std::uint64_t fee)
{
// Converts a fee in fee units to a fee in drops
updateFees ();
return getApp().getFeeTrack ().scaleFeeBase (
fee, mBaseFee, mReferenceFeeUnits);