Skip to content

Commit

Permalink
execute git-clang format, fixes XRPLF#3495
Browse files Browse the repository at this point in the history
  • Loading branch information
Chenna Keshava B S committed Jul 19, 2022
1 parent f3ec9d6 commit f3f0423
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/ripple/app/misc/impl/TxQ.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ static FeeLevel64
increase(FeeLevel64 level, std::uint32_t increasePercent)
{
return mulDiv(level, 100 + increasePercent, 100)
.value_or(
static_cast<FeeLevel64>(ripple::muldiv_max));
.value_or(static_cast<FeeLevel64>(ripple::muldiv_max));
}

//////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -113,12 +112,10 @@ TxQ::FeeMetrics::update(
// upperLimit must be >= minimumTxnCount_ or std::clamp can give
// unexpected results
auto const upperLimit = std::max<std::uint64_t>(
mulDiv(txnsExpected_, cutPct, 100)
.value_or(ripple::muldiv_max),
mulDiv(txnsExpected_, cutPct, 100).value_or(ripple::muldiv_max),
minimumTxnCount_);
txnsExpected_ = std::clamp<std::uint64_t>(
mulDiv(size, cutPct, 100)
.value_or(ripple::muldiv_max),
mulDiv(size, cutPct, 100).value_or(ripple::muldiv_max),
minimumTxnCount_,
upperLimit);
recentTxnCounts_.clear();
Expand Down Expand Up @@ -186,8 +183,7 @@ TxQ::FeeMetrics::scaleFeeLevel(Snapshot const& snapshot, OpenView const& view)
// Compute escalated fee level
// Don't care about the overflow flag
return mulDiv(multiplier, current * current, target * target)
.value_or(static_cast<FeeLevel64>(
ripple::muldiv_max));
.value_or(static_cast<FeeLevel64>(ripple::muldiv_max));
}

return baseLevel;
Expand Down

0 comments on commit f3f0423

Please sign in to comment.