From 301e546aa99d3aba607fd3026c3e30c240b5cb86 Mon Sep 17 00:00:00 2001 From: Nicholas Dudfield Date: Thu, 18 Jun 2026 10:42:28 +0700 Subject: [PATCH] chore(rng): assert active view source at round start --- src/xrpld/app/consensus/ConsensusExtensions.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/xrpld/app/consensus/ConsensusExtensions.cpp b/src/xrpld/app/consensus/ConsensusExtensions.cpp index 4c0ef3415..cd6015d29 100644 --- a/src/xrpld/app/consensus/ConsensusExtensions.cpp +++ b/src/xrpld/app/consensus/ConsensusExtensions.cpp @@ -2146,6 +2146,14 @@ ConsensusExtensions::onRoundStart( clearRngState(); roundPrevLedgerHash_ = prevLedger.ledger_->info().hash; cacheUNLReport(prevLedger.ledger_); + auto const validatorView = activeValidatorView(); + if (validatorView->sourceLedgerHash) + { + XRPL_ASSERT( + *validatorView->sourceLedgerHash == roundPrevLedgerHash_, + "ripple::ConsensusExtensions::onRoundStart : " + "active view source matches round parent"); + } setExpectedProposers(std::move(lastProposers)); resetSubState(); }