better log on finalized slot failure

This commit is contained in:
Jacek Sieka 2022-02-01 21:23:18 +01:00
parent bcd7b4598c
commit ff4f2a6b6c
No known key found for this signature in database
GPG Key ID: A1B09461ABB656B8

View File

@ -517,7 +517,10 @@ proc init*(T: type ChainDAGRef, cfg: RuntimeConfig, db: BeaconChainDB,
for blck in db.getAncestorSummaries(headRoot):
if midRef != nil and blck.summary.slot == midRef.slot:
if midRef.root != blck.root:
fatal "Finalized block table does not match ancestor summaries, database corrupt?"
fatal "Finalized block table does not match ancestor summaries, database corrupt?",
head = shortLog(headRoot), cur = shortLog(curRef),
midref = shortLog(midRef), blck = shortLog(blck.root)
quit 1
if curRef == nil: