fix: Remove 'new parent hash' assert (#5313)

This assert is known to occasionally trigger, without causing errors
downstream. It is replaced with a log message.
This commit is contained in:
Bronek Kozicki
2025-02-25 14:14:10 +00:00
committed by GitHub
parent ab44cc31e2
commit 9745718467
2 changed files with 7 additions and 10 deletions

View File

@@ -785,13 +785,10 @@ private:
*/
std::optional<size_t> maxSize_;
#if !NDEBUG
/**
parentHash_ checks that no unexpected ledger transitions
happen, and is only checked via debug asserts.
parentHash_ used for logging only
*/
LedgerHash parentHash_{beast::zero};
#endif
/** Most queue operations are done under the master lock,
but use this mutex for the RPC "fee" command, which isn't.

View File

@@ -1569,12 +1569,12 @@ TxQ::accept(Application& app, OpenView& view)
// parent hash, so that transactions paying the same fee are
// reordered.
LedgerHash const& parentHash = view.info().parentHash;
#if !NDEBUG
auto const startingSize = byFee_.size();
XRPL_ASSERT(
parentHash != parentHash_, "ripple::TxQ::accept : new parent hash");
parentHash_ = parentHash;
#endif
if (parentHash == parentHash_)
JLOG(j_.warn()) << "Parent ledger hash unchanged from " << parentHash;
else
parentHash_ = parentHash;
[[maybe_unused]] auto const startingSize = byFee_.size();
// byFee_ doesn't "own" the candidate objects inside it, so it's
// perfectly safe to wipe it and start over, repopulating from
// byAccount_.