20 #include <ripple/app/misc/LoadFeeTrack.h>
21 #include <ripple/basics/FeeUnits.h>
22 #include <ripple/basics/Log.h>
23 #include <ripple/basics/contract.h>
24 #include <ripple/basics/safe_cast.h>
25 #include <ripple/core/Config.h>
26 #include <ripple/ledger/ReadView.h>
27 #include <ripple/protocol/STAmount.h>
28 #include <ripple/protocol/jss.h>
59 JLOG(
j_.
debug()) <<
"Local load fee raised from " << origFee <<
" to "
80 JLOG(
j_.
debug()) <<
"Local load fee lowered from " << origFee <<
" to "
103 if (bUnlimited && (feeFactor > uRemFee) && (feeFactor < (4 * uRemFee)))
110 auto const result =
mulDiv(
111 fee, feeFactor, safe_cast<std::uint64_t>(feeTrack.
getLoadBase()));
113 Throw<std::overflow_error>(
"scaleFeeLoad");
114 return result.second;
static constexpr std::uint32_t lftFeeMax
static constexpr std::uint32_t lftFeeDecFraction
std::uint32_t getLoadBase() const
Reflects the fee settings for a particular ledger.
std::pair< std::uint32_t, std::uint32_t > getScalingFactors() const
static constexpr std::uint32_t lftFeeIncFraction
Manages the current fee schedule.
std::uint32_t remoteTxnLoadFee_
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
XRPAmount scaleFeeLoad(XRPAmount fee, LoadFeeTrack const &feeTrack, Fees const &fees, bool bUnlimited)
std::pair< bool, Dest > mulDiv(Source1 value, Dest mul, Source2 div)
std::uint32_t raiseCount_
static constexpr std::uint32_t lftNormalFee
std::uint32_t localTxnLoadFee_