chore(rng): assert active view source at round start

This commit is contained in:
Nicholas Dudfield
2026-06-18 10:42:28 +07:00
parent e2da1db6d2
commit 301e546aa9

View File

@@ -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();
}