Also report mismatched built ledger

This commit is contained in:
Vinnie Falco
2014-08-28 18:05:10 -07:00
committed by Nik Bougalis
parent 15aad1cb24
commit 61006e626d

View File

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