Skip to content

Commit dedb536

Browse files
committed
validate uncles appropriately across berlin -> london transition
1 parent 4b6dc06 commit dedb536

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

eth/vm/base.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,13 @@ def validate_uncle(cls,
668668
f"Uncle's gas usage ({uncle.gas_used}) is above "
669669
f"the limit ({uncle.gas_limit})"
670670
)
671-
validate_gas_limit(uncle.gas_limit, uncle_parent.gas_limit)
671+
672+
uncle_parent_gas_limit = uncle_parent.gas_limit
673+
if not hasattr(uncle_parent, 'base_fee_per_gas') and hasattr(uncle, 'base_fee_per_gas'):
674+
# if Berlin -> London transition, double the parent limit for validation
675+
uncle_parent_gas_limit *= 2
676+
677+
validate_gas_limit(uncle.gas_limit, uncle_parent_gas_limit)
672678

673679
#
674680
# State

0 commit comments

Comments
 (0)