mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-26 00:20:41 +00:00
refactor: Clean up comments post-clang-tidy changes (#7283)
This commit is contained in:
@@ -183,15 +183,15 @@ trustCreate(
|
||||
bool const bSrcHigh,
|
||||
AccountID const& uSrcAccountID,
|
||||
AccountID const& uDstAccountID,
|
||||
uint256 const& uIndex, // --> ripple state entry
|
||||
SLE::ref sleAccount, // --> the account being set.
|
||||
bool const bAuth, // --> authorize account.
|
||||
bool const bNoRipple, // --> others cannot ripple through
|
||||
bool const bFreeze, // --> funds cannot leave
|
||||
bool bDeepFreeze, // --> can neither receive nor send funds
|
||||
STAmount const& saBalance, // --> balance of account being set.
|
||||
uint256 const& uIndex, // ripple state entry
|
||||
SLE::ref sleAccount, // the account being set.
|
||||
bool const bAuth, // authorize account.
|
||||
bool const bNoRipple, // others cannot ripple through
|
||||
bool const bFreeze, // funds cannot leave
|
||||
bool bDeepFreeze, // can neither receive nor send funds
|
||||
STAmount const& saBalance, // balance of account being set.
|
||||
// Issuer should be noAccount()
|
||||
STAmount const& saLimit, // --> limit for account being set.
|
||||
STAmount const& saLimit, // limit for account being set.
|
||||
// Issuer should be the account being set.
|
||||
std::uint32_t uQualityIn,
|
||||
std::uint32_t uQualityOut,
|
||||
|
||||
@@ -1191,7 +1191,7 @@ directSendNoLimitMultiMPT(
|
||||
// Use uint64_t, not STAmount, to keep MaximumAmount comparisons in exact
|
||||
// integer arithmetic. STAmount implicitly converts to Number, whose
|
||||
// small-scale mantissa (~16 digits) can lose precision for values near
|
||||
// maxMPTokenAmount (19 digits).
|
||||
// kMaxMpTokenAmount (19 digits).
|
||||
std::uint64_t totalSendAmount{0};
|
||||
std::uint64_t const maximumAmount = sle->at(~sfMaximumAmount).value_or(kMaxMpTokenAmount);
|
||||
std::uint64_t const outstandingAmount = sle->getFieldU64(sfOutstandingAmount);
|
||||
|
||||
@@ -1238,7 +1238,7 @@ Transactor::operator()()
|
||||
|
||||
if (isTecClaim(result) && ((view().flags() & TapFailHard) != 0u))
|
||||
{
|
||||
// If the tapFAIL_HARD flag is set, a tec result
|
||||
// If the TapFailHard flag is set, a tec result
|
||||
// must not do anything
|
||||
ctx_.discard();
|
||||
applied = false;
|
||||
|
||||
@@ -115,8 +115,8 @@ DelegateSet::doApply()
|
||||
|
||||
(*sle)[sfOwnerNode] = *page;
|
||||
|
||||
// Add to authorized account's owner directory so the object can be found
|
||||
// and cleaned up when the authorized account is deleted.
|
||||
// Add to authorized account's owner directory so AccountDelete can find
|
||||
// and clean up inbound delegations when the authorized account is deleted.
|
||||
auto const destPage = ctx_.view().dirInsert(
|
||||
keylet::ownerDir(authAccount), delegateKey, describeOwnerDir(authAccount));
|
||||
|
||||
|
||||
@@ -80,14 +80,14 @@ AMMVote::preclaim(PreclaimContext const& ctx)
|
||||
}
|
||||
|
||||
static std::pair<TER, bool>
|
||||
applyVote(ApplyContext& ctx, Sandbox& sb, AccountID const& account, beast::Journal j)
|
||||
applyVote(ApplyContext& ctx, Sandbox& sb, AccountID const& accountID, beast::Journal j)
|
||||
{
|
||||
auto const feeNew = ctx.tx[sfTradingFee];
|
||||
auto ammSle = sb.peek(keylet::amm(ctx.tx[sfAsset], ctx.tx[sfAsset2]));
|
||||
if (!ammSle)
|
||||
return {tecINTERNAL, false};
|
||||
STAmount const lptAMMBalance = (*ammSle)[sfLPTokenBalance];
|
||||
auto const lpTokensNew = ammLPHolds(sb, *ammSle, account, ctx.journal);
|
||||
auto const lpTokensNew = ammLPHolds(sb, *ammSle, accountID, ctx.journal);
|
||||
std::optional<STAmount> minTokens;
|
||||
std::size_t minPos{0};
|
||||
AccountID minAccount{0};
|
||||
@@ -108,13 +108,13 @@ applyVote(ApplyContext& ctx, Sandbox& sb, AccountID const& account, beast::Journ
|
||||
auto lpTokens = ammLPHolds(sb, *ammSle, entryAccount, ctx.journal);
|
||||
if (lpTokens == beast::kZero)
|
||||
{
|
||||
JLOG(j.debug()) << "AMMVote::applyVote, account " << entryAccount << " is not LP";
|
||||
JLOG(j.debug()) << "AMMVote::applyVote, accountID " << entryAccount << " is not LP";
|
||||
continue;
|
||||
}
|
||||
auto feeVal = entry[sfTradingFee];
|
||||
STObject newEntry = STObject::makeInnerObject(sfVoteEntry);
|
||||
// The account already has the vote entry.
|
||||
if (entryAccount == account)
|
||||
if (entryAccount == accountID)
|
||||
{
|
||||
lpTokens = lpTokensNew;
|
||||
feeVal = feeNew;
|
||||
@@ -156,7 +156,7 @@ applyVote(ApplyContext& ctx, Sandbox& sb, AccountID const& account, beast::Journ
|
||||
sfVoteWeight,
|
||||
static_cast<std::int64_t>(
|
||||
Number(lpTokensNew) * kVoteWeightScaleFactor / lptAMMBalance));
|
||||
newEntry.setAccountID(sfAccount, account);
|
||||
newEntry.setAccountID(sfAccount, accountID);
|
||||
num += feeNew * lpTokensNew;
|
||||
den += lpTokensNew;
|
||||
if (minPos)
|
||||
|
||||
@@ -99,7 +99,7 @@ LoanPay::calculateBaseFee(ReadView const& view, STTx const& tx)
|
||||
|
||||
if (loanSle->at(sfPaymentRemaining) <= kLoanPaymentsPerFeeIncrement)
|
||||
{
|
||||
// If there are fewer than loanPaymentsPerFeeIncrement payments left to
|
||||
// If there are fewer than kLoanPaymentsPerFeeIncrement payments left to
|
||||
// pay, we can skip the computations.
|
||||
return normalCost;
|
||||
}
|
||||
|
||||
@@ -7037,7 +7037,7 @@ private:
|
||||
}
|
||||
|
||||
// This test validates both invariant changes work together for
|
||||
// the specific case of MPT/MPT pools with > maxDeletableAMMTrustLines.
|
||||
// the specific case of MPT/MPT pools with > kMaxDeletableAmmTrustLines.
|
||||
{
|
||||
Env env(
|
||||
*this,
|
||||
|
||||
@@ -182,7 +182,7 @@ class Invariants_test : public beast::unit_test::Suite
|
||||
|
||||
// Invariants normally run in the Transaction's "apply" (operator()) context, and can always
|
||||
// access global Rules.
|
||||
CurrentTransactionRulesGuard const rg(ov.rules());
|
||||
CurrentTransactionRulesGuard const rulesGuard(ov.rules());
|
||||
|
||||
BEAST_EXPECT(precheck(a1, a2, ac));
|
||||
|
||||
|
||||
@@ -4549,7 +4549,7 @@ NetworkOPsImp::getBookPage(
|
||||
uOfferOwnerID,
|
||||
book.out.currency,
|
||||
book.out.account,
|
||||
FreezeHandling::fhZERO_IF_FROZEN);
|
||||
FreezeHandling::ZeroIfFrozen);
|
||||
|
||||
if (saOwnerFunds.isNegative())
|
||||
{
|
||||
|
||||
@@ -395,7 +395,7 @@ TxQ::canBeHeld(
|
||||
// PreviousTxnID is deprecated and should never be used.
|
||||
// AccountTxnID is not supported by the transaction
|
||||
// queue yet, but should be added in the future.
|
||||
// tapFAIL_HARD transactions are never held
|
||||
// TapFailHard transactions are never held
|
||||
if (tx.isFieldPresent(sfPreviousTxnID) || tx.isFieldPresent(sfAccountTxnID) ||
|
||||
((flags & TapFailHard) != 0u))
|
||||
return telCAN_NOT_QUEUE;
|
||||
|
||||
Reference in New Issue
Block a user