Skip to content

Commit 889cac9

Browse files
committed
show headers that failed validation
1 parent c8144e5 commit 889cac9

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

eth/chains/base.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,16 @@ def validate_chain(
349349
child, child.parent_hash, parent.hash))
350350
should_check_seal = index in indices_to_check_seal
351351
vm_class = cls.get_vm_class_for_block_number(child.block_number)
352-
vm_class.validate_header(child, parent, check_seal=should_check_seal)
352+
try:
353+
vm_class.validate_header(child, parent, check_seal=should_check_seal)
354+
except ValidationError as exc:
355+
raise ValidationError(
356+
"%s is not a valid child of %s: %s" % (
357+
child,
358+
parent,
359+
exc,
360+
)
361+
) from exc
353362

354363

355364
class Chain(BaseChain):

0 commit comments

Comments
 (0)