Skip to content

Commit 0bd5815

Browse files
committed
Enable Constantinople State tests
1 parent 2b00e9d commit 0bd5815

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tests/json-fixtures/test_state.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@
2626
HomesteadVM,
2727
SpuriousDragonVM,
2828
ByzantiumVM,
29+
ConstantinopleVM,
2930
)
3031
from eth.vm.forks.tangerine_whistle.state import TangerineWhistleState
3132
from eth.vm.forks.frontier.state import FrontierState
3233
from eth.vm.forks.homestead.state import HomesteadState
3334
from eth.vm.forks.spurious_dragon.state import SpuriousDragonState
3435
from eth.vm.forks.byzantium.state import ByzantiumState
36+
from eth.vm.forks.constantinople.state import ConstantinopleState
3537

3638
from eth.rlp.headers import (
3739
BlockHeader,
@@ -208,6 +210,10 @@ def get_prev_hashes_testing(self, last_block_hash, db):
208210
__name__='ByzantiumStateForTesting',
209211
get_ancestor_hash=get_block_hash_for_testing,
210212
)
213+
ConstantinopleStateForTesting = ConstantinopleState.configure(
214+
__name__='ConstantinopleStateForTesting',
215+
get_ancestor_hash=get_block_hash_for_testing,
216+
)
211217

212218
FrontierVMForTesting = FrontierVM.configure(
213219
__name__='FrontierVMForTesting',
@@ -234,6 +240,11 @@ def get_prev_hashes_testing(self, last_block_hash, db):
234240
_state_class=ByzantiumStateForTesting,
235241
get_prev_hashes=get_prev_hashes_testing,
236242
)
243+
ConstantinopleVMForTesting = ConstantinopleVM.configure(
244+
__name__='ConstantinopleVMForTesting',
245+
_state_class=ConstantinopleStateForTesting,
246+
get_prev_hashes=get_prev_hashes_testing,
247+
)
237248

238249

239250
@pytest.fixture
@@ -250,7 +261,7 @@ def fixture_vm_class(fixture_data):
250261
elif fork_name == ForkName.Byzantium:
251262
return ByzantiumVMForTesting
252263
elif fork_name == ForkName.Constantinople:
253-
pytest.skip("Constantinople VM has not been implemented")
264+
return ConstantinopleVMForTesting
254265
elif fork_name == ForkName.Metropolis:
255266
pytest.skip("Metropolis VM has not been implemented")
256267
else:

0 commit comments

Comments
 (0)