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

Commit fb7b763

Browse files
vubvub
authored andcommitted
Added timestamp maximum
1 parent ca23ccf commit fb7b763

File tree

2 files changed

+2
-573
lines changed

2 files changed

+2
-573
lines changed

ethereum/blocks.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,8 @@ def __init__(self, header, transaction_list=[], uncles=[], env=None,
414414
raise ValueError("Gas used exceeds gas limit")
415415
if self.timestamp <= parent.header.timestamp:
416416
raise ValueError("Timestamp equal to or before parent")
417+
if self.timestamp >= 2**256:
418+
raise ValueError("Timestamp waaaaaaaaaaayy too large")
417419

418420
for uncle in uncles:
419421
assert isinstance(uncle, BlockHeader)

0 commit comments

Comments
 (0)