mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-25 13:35:54 +00:00
Be paranoid about ledger compatibility:
* Consider ledgers incompatible based on last valid ledger * Test against even ledgers not acquired yet * Don't validate an incompatible ledger * Don't switch to an incompatible ledger * Protect against an unreasonably small quorum
This commit is contained in:
@@ -1038,6 +1038,14 @@ void LedgerConsensusImp::accept (std::shared_ptr<SHAMap> set)
|
||||
// Tell directly connected peers that we have a new LCL
|
||||
statusChange (protocol::neACCEPTED_LEDGER, *newLCL);
|
||||
|
||||
if (mValidating &&
|
||||
! ledgerMaster_.isCompatible (newLCL,
|
||||
deprecatedLogs().journal("LedgerConsensus").warning,
|
||||
"Not validating"))
|
||||
{
|
||||
mValidating = false;
|
||||
}
|
||||
|
||||
if (mValidating && !mConsensusFail)
|
||||
{
|
||||
// Build validation
|
||||
|
||||
Reference in New Issue
Block a user