Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove 'new parent hash' assert #5313

Merged
merged 2 commits into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/xrpld/app/misc/TxQ.h
Original file line number Diff line number Diff line change
Expand Up @@ -785,13 +785,10 @@ class TxQ
*/
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.
Expand Down
12 changes: 6 additions & 6 deletions src/xrpld/app/misc/detail/TxQ.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 hash unchanged";
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_.
Expand Down
Loading