2626 HomesteadVM ,
2727 SpuriousDragonVM ,
2828 ByzantiumVM ,
29+ ConstantinopleVM ,
2930)
3031from eth .vm .forks .tangerine_whistle .state import TangerineWhistleState
3132from eth .vm .forks .frontier .state import FrontierState
3233from eth .vm .forks .homestead .state import HomesteadState
3334from eth .vm .forks .spurious_dragon .state import SpuriousDragonState
3435from eth .vm .forks .byzantium .state import ByzantiumState
36+ from eth .vm .forks .constantinople .state import ConstantinopleState
3537
3638from 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
212218FrontierVMForTesting = 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