From 61006e626dddab337ca7c4200c5375d62d41911b Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Thu, 28 Aug 2014 18:05:10 -0700 Subject: [PATCH] Also report mismatched built ledger --- src/ripple/module/app/ledger/LedgerHistory.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ripple/module/app/ledger/LedgerHistory.cpp b/src/ripple/module/app/ledger/LedgerHistory.cpp index 0716c4887..bb6560d7f 100644 --- a/src/ripple/module/app/ledger/LedgerHistory.cpp +++ b/src/ripple/module/app/ledger/LedgerHistory.cpp @@ -136,14 +136,22 @@ void LedgerHistory::builtLedger (Ledger::ref ledger) if (entry->first != hash) { + bool mismatch (false); + if (entry->first.isNonZero() && (entry->first != hash)) { WriteLog (lsERROR, LedgerMaster) << "MISMATCH: seq=" << index << " built:" << entry->first << " then:" << hash; + mismatch = true; } if (entry->second.isNonZero() && (entry->second != hash)) { WriteLog (lsERROR, LedgerMaster) << "MISMATCH: seq=" << index << " validated:" << entry->second << " accepted:" << hash; + mismatch = true; } + + if (mismatch) + ++mismatch_counter_; + entry->first = hash; } }