File tree Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -634,10 +634,10 @@ def validate_uncle(cls,
634
634
f"Uncle number ({ uncle .block_number } ) is not one above "
635
635
f"ancestor's number ({ uncle_parent .block_number } )"
636
636
)
637
- if uncle .timestamp < uncle_parent .timestamp :
637
+ if uncle .timestamp <= uncle_parent .timestamp :
638
638
raise ValidationError (
639
- f"Uncle timestamp ({ uncle .timestamp } ) is before "
640
- f"ancestor 's timestamp ({ uncle_parent .timestamp } )"
639
+ f"Uncle timestamp ({ uncle .timestamp } ) is not newer than its "
640
+ f"parent 's timestamp ({ uncle_parent .timestamp } )"
641
641
)
642
642
if uncle .gas_used > uncle .gas_limit :
643
643
raise ValidationError (
Original file line number Diff line number Diff line change
1
+ Uncles with the same timestamp as their parents are invalid. Reject them, and add the test from
2
+ ethereum/tests.
Original file line number Diff line number Diff line change 196
196
# but only in Istanbul, not in Constantinople.
197
197
('GeneralStateTests/stSStoreTest/InitCollision.json' , 'InitCollision_d2g0v0_Istanbul' ),
198
198
('GeneralStateTests/stSStoreTest/InitCollision.json' , 'InitCollision_d3g0v0_Istanbul' ),
199
- # It's not clear how or why this test changed. It doesn't make sense that it only tests Istanbul
200
- # either. See: https://github.com/ethereum/tests/issues/787
201
- # The test seems to claim to test what happens if the uncle timestamp is the same as
202
- # the block, but the RLP doesn't encode a matching timestamp.
203
- ('InvalidBlocks/bcUncleHeaderValidity/incorrectUncleTimestamp.json' , 'incorrectUncleTimestamp_Istanbul' ), # noqa: E501
204
- ('InvalidBlocks/bcUncleHeaderValidity/incorrectUncleTimestamp.json' , 'incorrectUncleTimestamp_Berlin' ), # noqa: E501
205
199
}
206
200
207
201
You can’t perform that action at this time.
0 commit comments