Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit 03e1c88

Browse files
committed
Add gaslimit upper bound of 2**63-1 EIP 106
For reference: - ethereum/EIPs#92 - ethereum/EIPs#106
1 parent a1ffdbc commit 03e1c88

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ethereum/blocks.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,9 @@ def __init__(self, header, transaction_list=[], uncles=[], env=None,
446446
if self.timestamp >= 2 ** 256:
447447
raise ValueError("Timestamp waaaaaaaaaaayy too large")
448448

449+
if self.gas_limit > 2 ** 63 - 1:
450+
raise ValueError("Block's gaslimit went too high!")
451+
449452
for uncle in uncles:
450453
assert isinstance(uncle, BlockHeader)
451454

0 commit comments

Comments
 (0)