mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-05 17:56:49 +00:00
chore: rollback unrelated changes (#5737)
This commit is contained in:
@@ -68,8 +68,8 @@ class ByzantineFailureSim_test : public beast::unit_test::suite
|
||||
for (TrustGraph<Peer*>::ForkInfo const& fi :
|
||||
sim.trustGraph.forkablePairs(0.8))
|
||||
{
|
||||
std::cout << "Can fork " << PeerGroup{fi.unlA} << " " << " "
|
||||
<< PeerGroup{fi.unlB} << " overlap " << fi.overlap
|
||||
std::cout << "Can fork " << PeerGroup{fi.unlA} << " "
|
||||
<< " " << PeerGroup{fi.unlB} << " overlap " << fi.overlap
|
||||
<< " required " << fi.required << "\n";
|
||||
};
|
||||
|
||||
|
||||
@@ -897,8 +897,9 @@ protected:
|
||||
printPeers(std::string const& msg, std::uint16_t validator = 0)
|
||||
{
|
||||
auto peers = network_.overlay().getPeers(network_.validator(validator));
|
||||
std::cout << msg << " " << "num peers "
|
||||
<< (int)network_.overlay().getNumPeers() << std::endl;
|
||||
std::cout << msg << " "
|
||||
<< "num peers " << (int)network_.overlay().getNumPeers()
|
||||
<< std::endl;
|
||||
for (auto& [k, v] : peers)
|
||||
std::cout << k << ":" << (int)std::get<reduce_relay::PeerState>(v)
|
||||
<< " ";
|
||||
|
||||
@@ -100,8 +100,8 @@ TimeoutCounter::invokeOnTimer()
|
||||
if (!progress_)
|
||||
{
|
||||
++timeouts_;
|
||||
JLOG(journal_.debug())
|
||||
<< "Timeout(" << timeouts_ << ") " << " acquiring " << hash_;
|
||||
JLOG(journal_.debug()) << "Timeout(" << timeouts_ << ") "
|
||||
<< " acquiring " << hash_;
|
||||
onTimer(false, sl);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -447,8 +447,8 @@ GRPCServerImpl::handleRpcs()
|
||||
|
||||
if (!ok)
|
||||
{
|
||||
JLOG(journal_.debug())
|
||||
<< "Request listener cancelled. " << "Destroying object";
|
||||
JLOG(journal_.debug()) << "Request listener cancelled. "
|
||||
<< "Destroying object";
|
||||
erase(ptr);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -384,9 +384,9 @@ changeSpotPriceQuality(
|
||||
{
|
||||
JLOG(j.error())
|
||||
<< "changeSpotPriceQuality failed: " << to_string(pool.in)
|
||||
<< " " << to_string(pool.out) << " " << " " << quality
|
||||
<< " " << tfee << " " << to_string(amounts.in) << " "
|
||||
<< to_string(amounts.out);
|
||||
<< " " << to_string(pool.out) << " "
|
||||
<< " " << quality << " " << tfee << " "
|
||||
<< to_string(amounts.in) << " " << to_string(amounts.out);
|
||||
Throw<std::runtime_error>("changeSpotPriceQuality failed");
|
||||
}
|
||||
else
|
||||
|
||||
@@ -151,8 +151,8 @@ ammLPHolds(
|
||||
}
|
||||
amount.setIssuer(ammAccount);
|
||||
|
||||
JLOG(j.trace()) << "ammLPHolds:" << " lpAccount="
|
||||
<< to_string(lpAccount)
|
||||
JLOG(j.trace()) << "ammLPHolds:"
|
||||
<< " lpAccount=" << to_string(lpAccount)
|
||||
<< " amount=" << amount.getFullText();
|
||||
}
|
||||
|
||||
|
||||
@@ -1504,11 +1504,11 @@ TxQ::accept(Application& app, OpenView& view)
|
||||
}
|
||||
else
|
||||
{
|
||||
JLOG(j_.debug())
|
||||
<< "Queued transaction " << candidateIter->txID
|
||||
<< " failed with " << transToken(txnResult)
|
||||
<< ". Leave in queue." << " Applied: " << didApply
|
||||
<< ". Flags: " << candidateIter->flags;
|
||||
JLOG(j_.debug()) << "Queued transaction " << candidateIter->txID
|
||||
<< " failed with " << transToken(txnResult)
|
||||
<< ". Leave in queue."
|
||||
<< " Applied: " << didApply
|
||||
<< ". Flags: " << candidateIter->flags;
|
||||
if (account.retryPenalty && candidateIter->retriesRemaining > 2)
|
||||
candidateIter->retriesRemaining = 1;
|
||||
else
|
||||
|
||||
@@ -238,7 +238,8 @@ Pathfinder::findPaths(
|
||||
mSource = STPathElement(account, mSrcCurrency, issuer);
|
||||
auto issuerString =
|
||||
mSrcIssuer ? to_string(*mSrcIssuer) : std::string("none");
|
||||
JLOG(j_.trace()) << "findPaths>" << " mSrcAccount=" << mSrcAccount
|
||||
JLOG(j_.trace()) << "findPaths>"
|
||||
<< " mSrcAccount=" << mSrcAccount
|
||||
<< " mDstAccount=" << mDstAccount
|
||||
<< " mDstAmount=" << mDstAmount.getFullText()
|
||||
<< " mSrcCurrency=" << mSrcCurrency
|
||||
|
||||
@@ -190,7 +190,8 @@ protected:
|
||||
logStringImpl(char const* name) const
|
||||
{
|
||||
std::ostringstream ostr;
|
||||
ostr << name << ": " << "\ninIss: " << book_.in.account
|
||||
ostr << name << ": "
|
||||
<< "\ninIss: " << book_.in.account
|
||||
<< "\noutIss: " << book_.out.account
|
||||
<< "\ninCur: " << book_.in.currency
|
||||
<< "\noutCur: " << book_.out.currency;
|
||||
|
||||
@@ -205,7 +205,8 @@ protected:
|
||||
logStringImpl(char const* name) const
|
||||
{
|
||||
std::ostringstream ostr;
|
||||
ostr << name << ": " << "\nSrc: " << src_ << "\nDst: " << dst_;
|
||||
ostr << name << ": "
|
||||
<< "\nSrc: " << src_ << "\nDst: " << dst_;
|
||||
return ostr.str();
|
||||
}
|
||||
|
||||
|
||||
@@ -132,7 +132,8 @@ protected:
|
||||
logStringImpl(char const* name) const
|
||||
{
|
||||
std::ostringstream ostr;
|
||||
ostr << name << ": " << "\nAcc: " << acc_;
|
||||
ostr << name << ": "
|
||||
<< "\nAcc: " << acc_;
|
||||
return ostr.str();
|
||||
}
|
||||
|
||||
|
||||
@@ -238,8 +238,8 @@ rangeCheckedCast(C c)
|
||||
/* This should never happen */
|
||||
UNREACHABLE("ripple::rangeCheckedCast : domain error");
|
||||
JLOG(debugLog().error())
|
||||
<< "rangeCheckedCast domain error:" << " value = " << c
|
||||
<< " min = " << std::numeric_limits<T>::lowest()
|
||||
<< "rangeCheckedCast domain error:"
|
||||
<< " value = " << c << " min = " << std::numeric_limits<T>::lowest()
|
||||
<< " max: " << std::numeric_limits<T>::max();
|
||||
}
|
||||
|
||||
|
||||
@@ -212,8 +212,8 @@ Batch::preflight(PreflightContext const& ctx)
|
||||
|
||||
if (flags & tfBatchMask)
|
||||
{
|
||||
JLOG(ctx.j.debug())
|
||||
<< "BatchTrace[" << parentBatchId << "]:" << "invalid flags.";
|
||||
JLOG(ctx.j.debug()) << "BatchTrace[" << parentBatchId << "]:"
|
||||
<< "invalid flags.";
|
||||
return temINVALID_FLAG;
|
||||
}
|
||||
|
||||
@@ -221,24 +221,23 @@ Batch::preflight(PreflightContext const& ctx)
|
||||
flags &
|
||||
(tfAllOrNothing | tfOnlyOne | tfUntilFailure | tfIndependent)) != 1)
|
||||
{
|
||||
JLOG(ctx.j.debug())
|
||||
<< "BatchTrace[" << parentBatchId << "]:" << "too many flags.";
|
||||
JLOG(ctx.j.debug()) << "BatchTrace[" << parentBatchId << "]:"
|
||||
<< "too many flags.";
|
||||
return temINVALID_FLAG;
|
||||
}
|
||||
|
||||
auto const& rawTxns = ctx.tx.getFieldArray(sfRawTransactions);
|
||||
if (rawTxns.size() <= 1)
|
||||
{
|
||||
JLOG(ctx.j.debug())
|
||||
<< "BatchTrace[" << parentBatchId
|
||||
<< "]:" << "txns array must have at least 2 entries.";
|
||||
JLOG(ctx.j.debug()) << "BatchTrace[" << parentBatchId << "]:"
|
||||
<< "txns array must have at least 2 entries.";
|
||||
return temARRAY_EMPTY;
|
||||
}
|
||||
|
||||
if (rawTxns.size() > maxBatchTxCount)
|
||||
{
|
||||
JLOG(ctx.j.debug()) << "BatchTrace[" << parentBatchId
|
||||
<< "]:" << "txns array exceeds 8 entries.";
|
||||
JLOG(ctx.j.debug()) << "BatchTrace[" << parentBatchId << "]:"
|
||||
<< "txns array exceeds 8 entries.";
|
||||
return temARRAY_TOO_LARGE;
|
||||
}
|
||||
|
||||
@@ -253,53 +252,50 @@ Batch::preflight(PreflightContext const& ctx)
|
||||
auto const hash = stx.getTransactionID();
|
||||
if (!uniqueHashes.emplace(hash).second)
|
||||
{
|
||||
JLOG(ctx.j.debug())
|
||||
<< "BatchTrace[" << parentBatchId
|
||||
<< "]: " << "duplicate Txn found. " << "txID: " << hash;
|
||||
JLOG(ctx.j.debug()) << "BatchTrace[" << parentBatchId << "]: "
|
||||
<< "duplicate Txn found. "
|
||||
<< "txID: " << hash;
|
||||
return temREDUNDANT;
|
||||
}
|
||||
|
||||
if (stx.getFieldU16(sfTransactionType) == ttBATCH)
|
||||
{
|
||||
JLOG(ctx.j.debug())
|
||||
<< "BatchTrace[" << parentBatchId
|
||||
<< "]: " << "batch cannot have an inner batch txn. "
|
||||
<< "txID: " << hash;
|
||||
JLOG(ctx.j.debug()) << "BatchTrace[" << parentBatchId << "]: "
|
||||
<< "batch cannot have an inner batch txn. "
|
||||
<< "txID: " << hash;
|
||||
return temINVALID;
|
||||
}
|
||||
|
||||
if (!(stx.getFlags() & tfInnerBatchTxn))
|
||||
{
|
||||
JLOG(ctx.j.debug())
|
||||
<< "BatchTrace[" << parentBatchId
|
||||
<< "]: " << "inner txn must have the tfInnerBatchTxn flag. "
|
||||
<< "BatchTrace[" << parentBatchId << "]: "
|
||||
<< "inner txn must have the tfInnerBatchTxn flag. "
|
||||
<< "txID: " << hash;
|
||||
return temINVALID_FLAG;
|
||||
}
|
||||
|
||||
if (stx.isFieldPresent(sfTxnSignature))
|
||||
{
|
||||
JLOG(ctx.j.debug())
|
||||
<< "BatchTrace[" << parentBatchId
|
||||
<< "]: " << "inner txn cannot include TxnSignature. "
|
||||
<< "txID: " << hash;
|
||||
JLOG(ctx.j.debug()) << "BatchTrace[" << parentBatchId << "]: "
|
||||
<< "inner txn cannot include TxnSignature. "
|
||||
<< "txID: " << hash;
|
||||
return temBAD_SIGNATURE;
|
||||
}
|
||||
|
||||
if (stx.isFieldPresent(sfSigners))
|
||||
{
|
||||
JLOG(ctx.j.debug()) << "BatchTrace[" << parentBatchId
|
||||
<< "]: " << "inner txn cannot include Signers. "
|
||||
JLOG(ctx.j.debug()) << "BatchTrace[" << parentBatchId << "]: "
|
||||
<< "inner txn cannot include Signers. "
|
||||
<< "txID: " << hash;
|
||||
return temBAD_SIGNER;
|
||||
}
|
||||
|
||||
if (!stx.getSigningPubKey().empty())
|
||||
{
|
||||
JLOG(ctx.j.debug())
|
||||
<< "BatchTrace[" << parentBatchId
|
||||
<< "]: " << "inner txn SigningPubKey must be empty. "
|
||||
<< "txID: " << hash;
|
||||
JLOG(ctx.j.debug()) << "BatchTrace[" << parentBatchId << "]: "
|
||||
<< "inner txn SigningPubKey must be empty. "
|
||||
<< "txID: " << hash;
|
||||
return temBAD_REGKEY;
|
||||
}
|
||||
|
||||
@@ -308,10 +304,10 @@ Batch::preflight(PreflightContext const& ctx)
|
||||
ctx.app, ctx.rules, parentBatchId, stx, tapBATCH, ctx.j);
|
||||
preflightResult.ter != tesSUCCESS)
|
||||
{
|
||||
JLOG(ctx.j.debug())
|
||||
<< "BatchTrace[" << parentBatchId
|
||||
<< "]: " << "inner txn preflight failed: "
|
||||
<< transHuman(preflightResult.ter) << " " << "txID: " << hash;
|
||||
JLOG(ctx.j.debug()) << "BatchTrace[" << parentBatchId << "]: "
|
||||
<< "inner txn preflight failed: "
|
||||
<< transHuman(preflightResult.ter) << " "
|
||||
<< "txID: " << hash;
|
||||
return temINVALID_INNER_BATCH;
|
||||
}
|
||||
|
||||
@@ -319,8 +315,8 @@ Batch::preflight(PreflightContext const& ctx)
|
||||
if (auto const fee = stx.getFieldAmount(sfFee);
|
||||
!fee.native() || fee.xrp() != beast::zero)
|
||||
{
|
||||
JLOG(ctx.j.debug()) << "BatchTrace[" << parentBatchId
|
||||
<< "]: " << "inner txn must have a fee of 0. "
|
||||
JLOG(ctx.j.debug()) << "BatchTrace[" << parentBatchId << "]: "
|
||||
<< "inner txn must have a fee of 0. "
|
||||
<< "txID: " << hash;
|
||||
return temBAD_FEE;
|
||||
}
|
||||
@@ -357,7 +353,8 @@ Batch::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
JLOG(ctx.j.debug())
|
||||
<< "BatchTrace[" << parentBatchId << "]: "
|
||||
<< "duplicate sequence found: " << "txID: " << hash;
|
||||
<< "duplicate sequence found: "
|
||||
<< "txID: " << hash;
|
||||
return temREDUNDANT;
|
||||
}
|
||||
}
|
||||
@@ -369,7 +366,8 @@ Batch::preflight(PreflightContext const& ctx)
|
||||
{
|
||||
JLOG(ctx.j.debug())
|
||||
<< "BatchTrace[" << parentBatchId << "]: "
|
||||
<< "duplicate ticket found: " << "txID: " << hash;
|
||||
<< "duplicate ticket found: "
|
||||
<< "txID: " << hash;
|
||||
return temREDUNDANT;
|
||||
}
|
||||
}
|
||||
@@ -395,8 +393,8 @@ Batch::preflight(PreflightContext const& ctx)
|
||||
// Check that the batch signers array is not too large.
|
||||
if (signers.size() > maxBatchTxCount)
|
||||
{
|
||||
JLOG(ctx.j.debug()) << "BatchTrace[" << parentBatchId
|
||||
<< "]: " << "signers array exceeds 8 entries.";
|
||||
JLOG(ctx.j.debug()) << "BatchTrace[" << parentBatchId << "]: "
|
||||
<< "signers array exceeds 8 entries.";
|
||||
return temARRAY_TOO_LARGE;
|
||||
}
|
||||
|
||||
@@ -419,8 +417,8 @@ Batch::preflight(PreflightContext const& ctx)
|
||||
if (!batchSigners.insert(signerAccount).second)
|
||||
{
|
||||
JLOG(ctx.j.debug())
|
||||
<< "BatchTrace[" << parentBatchId
|
||||
<< "]: " << "duplicate signer found: " << signerAccount;
|
||||
<< "BatchTrace[" << parentBatchId << "]: "
|
||||
<< "duplicate signer found: " << signerAccount;
|
||||
return temREDUNDANT;
|
||||
}
|
||||
|
||||
@@ -428,9 +426,8 @@ Batch::preflight(PreflightContext const& ctx)
|
||||
// Remove it if it does, as it can be crossed off the list.
|
||||
if (requiredSigners.erase(signerAccount) == 0)
|
||||
{
|
||||
JLOG(ctx.j.debug())
|
||||
<< "BatchTrace[" << parentBatchId
|
||||
<< "]: " << "no account signature for inner txn.";
|
||||
JLOG(ctx.j.debug()) << "BatchTrace[" << parentBatchId << "]: "
|
||||
<< "no account signature for inner txn.";
|
||||
return temBAD_SIGNER;
|
||||
}
|
||||
}
|
||||
@@ -450,8 +447,8 @@ Batch::preflight(PreflightContext const& ctx)
|
||||
|
||||
if (!requiredSigners.empty())
|
||||
{
|
||||
JLOG(ctx.j.debug()) << "BatchTrace[" << parentBatchId
|
||||
<< "]: " << "invalid batch signers.";
|
||||
JLOG(ctx.j.debug()) << "BatchTrace[" << parentBatchId << "]: "
|
||||
<< "invalid batch signers.";
|
||||
return temBAD_SIGNER;
|
||||
}
|
||||
return tesSUCCESS;
|
||||
|
||||
@@ -35,8 +35,8 @@ CancelOffer::preflight(PreflightContext const& ctx)
|
||||
|
||||
if (uTxFlags & tfUniversalMask)
|
||||
{
|
||||
JLOG(ctx.j.trace())
|
||||
<< "Malformed transaction: " << "Invalid flags set.";
|
||||
JLOG(ctx.j.trace()) << "Malformed transaction: "
|
||||
<< "Invalid flags set.";
|
||||
return temINVALID_FLAG;
|
||||
}
|
||||
|
||||
@@ -63,8 +63,8 @@ CancelOffer::preclaim(PreclaimContext const& ctx)
|
||||
|
||||
if ((*sle)[sfSequence] <= offerSequence)
|
||||
{
|
||||
JLOG(ctx.j.trace()) << "Malformed transaction: " << "Sequence "
|
||||
<< offerSequence << " is invalid.";
|
||||
JLOG(ctx.j.trace()) << "Malformed transaction: "
|
||||
<< "Sequence " << offerSequence << " is invalid.";
|
||||
return temBAD_SEQUENCE;
|
||||
}
|
||||
|
||||
|
||||
@@ -1121,8 +1121,8 @@ Consensus<Adaptor>::checkLedger(std::unique_ptr<std::stringstream> const& clog)
|
||||
|
||||
auto netLgr =
|
||||
adaptor_.getPrevLedger(prevLedgerID_, previousLedger_, mode_.get());
|
||||
CLOG(clog) << "network ledgerid " << netLgr << ", " << "previous ledger "
|
||||
<< prevLedgerID_ << ". ";
|
||||
CLOG(clog) << "network ledgerid " << netLgr << ", "
|
||||
<< "previous ledger " << prevLedgerID_ << ". ";
|
||||
|
||||
if (netLgr != prevLedgerID_)
|
||||
{
|
||||
@@ -1213,7 +1213,8 @@ Consensus<Adaptor>::phaseOpen(std::unique_ptr<std::stringstream> const& clog)
|
||||
adaptor_.parms().ledgerIDLE_INTERVAL,
|
||||
2 * previousLedger_.closeTimeResolution());
|
||||
CLOG(clog) << "idle interval set to " << idleInterval.count()
|
||||
<< "ms based on " << "ledgerIDLE_INTERVAL: "
|
||||
<< "ms based on "
|
||||
<< "ledgerIDLE_INTERVAL: "
|
||||
<< adaptor_.parms().ledgerIDLE_INTERVAL.count()
|
||||
<< ", previous ledger close time resolution: "
|
||||
<< previousLedger_.closeTimeResolution().count() << "ms. ";
|
||||
@@ -1261,7 +1262,8 @@ Consensus<Adaptor>::shouldPause(
|
||||
<< "roundTime: " << result_->roundTime.read().count() << ", "
|
||||
<< "max consensus time: " << parms.ledgerMAX_CONSENSUS.count() << ", "
|
||||
<< "validators: " << totalValidators << ", "
|
||||
<< "laggards: " << laggards << ", " << "offline: " << offline << ", "
|
||||
<< "laggards: " << laggards << ", "
|
||||
<< "offline: " << offline << ", "
|
||||
<< "quorum: " << quorum << ")";
|
||||
|
||||
if (!ahead || !laggards || !totalValidators || !adaptor_.validator() ||
|
||||
@@ -1622,8 +1624,8 @@ Consensus<Adaptor>::updateOurPositions(
|
||||
if (!haveCloseTimeConsensus_)
|
||||
{
|
||||
JLOG(j_.debug())
|
||||
<< "No CT consensus:" << " Proposers:"
|
||||
<< currPeerPositions_.size()
|
||||
<< "No CT consensus:"
|
||||
<< " Proposers:" << currPeerPositions_.size()
|
||||
<< " Mode:" << to_string(mode_.get())
|
||||
<< " Thresh:" << threshConsensus
|
||||
<< " Pos:" << consensusCloseTime.time_since_epoch().count();
|
||||
|
||||
@@ -457,7 +457,8 @@ accountHolds(
|
||||
amount.clear(Issue{currency, issuer});
|
||||
}
|
||||
|
||||
JLOG(j.trace()) << "accountHolds:" << " account=" << to_string(account)
|
||||
JLOG(j.trace()) << "accountHolds:"
|
||||
<< " account=" << to_string(account)
|
||||
<< " amount=" << amount.getFullText();
|
||||
|
||||
return view.balanceHook(account, issuer, amount);
|
||||
@@ -638,7 +639,8 @@ xrpLiquid(
|
||||
STAmount const amount =
|
||||
(balance < reserve) ? STAmount{0} : balance - reserve;
|
||||
|
||||
JLOG(j.trace()) << "accountHolds:" << " account=" << to_string(id)
|
||||
JLOG(j.trace()) << "accountHolds:"
|
||||
<< " account=" << to_string(id)
|
||||
<< " amount=" << amount.getFullText()
|
||||
<< " fullBalance=" << fullBalance.getFullText()
|
||||
<< " balance=" << balance.getFullText()
|
||||
|
||||
@@ -1286,8 +1286,8 @@ PeerImp::handleTransaction(
|
||||
{
|
||||
// If we've never been in synch, there's nothing we can do
|
||||
// with a transaction
|
||||
JLOG(p_journal_.debug())
|
||||
<< "Ignoring incoming transaction: " << "Need network ledger";
|
||||
JLOG(p_journal_.debug()) << "Ignoring incoming transaction: "
|
||||
<< "Need network ledger";
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1132,9 +1132,9 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
JLOG(m_journal.error())
|
||||
<< beast::leftw(18) << "Logic failed " << "'" << source->name()
|
||||
<< "' fetch, " << results.error.message();
|
||||
JLOG(m_journal.error()) << beast::leftw(18) << "Logic failed "
|
||||
<< "'" << source->name() << "' fetch, "
|
||||
<< results.error.message();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user