Skip to content

Commit 41c0703

Browse files
committed
Fix test: only thing wrong should be block number
The old test implementation was finding other problems, like a base_fee_per_gas that did not match the parent.
1 parent f0a38a3 commit 41c0703

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

tests/core/tester/test_generate_vm_configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class CustomFrontierVM(FrontierVM):
3333
(
3434
(),
3535
{},
36-
((0, Forks.Berlin),),
36+
((0, Forks.London),),
3737
),
3838
(
3939
((0, 'tangerine-whistle'), (1, 'spurious-dragon')),

tests/core/vm/test_vm.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,9 @@ def test_validate_header_succeeds_but_pow_fails(pow_consensus_chain, noproof_con
115115

116116
def test_validate_header_fails_on_invalid_parent(noproof_consensus_chain):
117117
block1 = noproof_consensus_chain.mine_block()
118-
noproof_consensus_chain.mine_block()
119-
block3 = noproof_consensus_chain.mine_block()
118+
block2 = noproof_consensus_chain.mine_block()
120119

121-
vm = noproof_consensus_chain.get_vm(block3.header)
120+
vm = noproof_consensus_chain.get_vm(block2.header)
122121

123122
with pytest.raises(ValidationError, match="Blocks must be numbered consecutively"):
124-
vm.validate_header(block3.header, block1.header)
123+
vm.validate_header(block2.header.copy(block_number=3), block1.header)

0 commit comments

Comments
 (0)