From 973ea96e1ae1eceac2a75455095050ac74eda427 Mon Sep 17 00:00:00 2001 From: kdeme Date: Mon, 15 Jul 2019 13:26:03 +0200 Subject: [PATCH] Add txRoot check to avoid assertions in tracer + don't throw exception --- nimbus/p2p/chain.nim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nimbus/p2p/chain.nim b/nimbus/p2p/chain.nim index 56ceec272..a8b989823 100644 --- a/nimbus/p2p/chain.nim +++ b/nimbus/p2p/chain.nim @@ -52,9 +52,10 @@ method persistBlocks*(c: Chain, headers: openarray[BlockHeader], bodies: openarr let validationResult = processBlock(c.db, headers[i], bodies[i], vmState) when not defined(release): - if validationResult == ValidationResult.Error: + if validationResult == ValidationResult.Error and + bodies[i].transactions.calcTxRoot == headers[i].txRoot: dumpDebuggingMetaData(c.db, headers[i], bodies[i], vmState) - raise newException(Exception, "Validation error. Debugging metadata dumped.") + warn "Validation error. Debugging metadata dumped." if validationResult != ValidationResult.OK: return validationResult