mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-13 22:04:52 +00:00
Add txRoot check to avoid assertions in tracer + don't throw exception
This commit is contained in:
parent
0e50db662b
commit
973ea96e1a
@ -52,9 +52,10 @@ method persistBlocks*(c: Chain, headers: openarray[BlockHeader], bodies: openarr
|
|||||||
let validationResult = processBlock(c.db, headers[i], bodies[i], vmState)
|
let validationResult = processBlock(c.db, headers[i], bodies[i], vmState)
|
||||||
|
|
||||||
when not defined(release):
|
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)
|
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:
|
if validationResult != ValidationResult.OK:
|
||||||
return validationResult
|
return validationResult
|
||||||
|
Loading…
x
Reference in New Issue
Block a user