From ea7350b3f8af049e635c47fe11106193c9ea8700 Mon Sep 17 00:00:00 2001 From: Christoph Burgdorf Date: Wed, 20 Nov 2019 16:55:55 +0100 Subject: [PATCH] WIP: make sure validate_header also validates seal on parent --- eth/vm/base.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/eth/vm/base.py b/eth/vm/base.py index 2bcf305656..9577500b01 100644 --- a/eth/vm/base.py +++ b/eth/vm/base.py @@ -641,11 +641,19 @@ def validate_header(cls, ) if check_seal: + try: + cls.validate_seal(parent_header) + except ValidationError: + cls.cls_logger.warning( + "Failed to validate seal on parent header: %r", + header.as_dict() + ) + raise try: cls.validate_seal(header) except ValidationError: cls.cls_logger.warning( - "Failed to validate header proof of work on header: %r", + "Failed to validate seal on header: %r", header.as_dict() ) raise