26
26
HomesteadVM ,
27
27
SpuriousDragonVM ,
28
28
ByzantiumVM ,
29
+ ConstantinopleVM ,
29
30
)
30
31
from eth .vm .forks .tangerine_whistle .state import TangerineWhistleState
31
32
from eth .vm .forks .frontier .state import FrontierState
32
33
from eth .vm .forks .homestead .state import HomesteadState
33
34
from eth .vm .forks .spurious_dragon .state import SpuriousDragonState
34
35
from eth .vm .forks .byzantium .state import ByzantiumState
36
+ from eth .vm .forks .constantinople .state import ConstantinopleState
35
37
36
38
from eth .rlp .headers import (
37
39
BlockHeader ,
@@ -208,6 +210,10 @@ def get_prev_hashes_testing(self, last_block_hash, db):
208
210
__name__ = 'ByzantiumStateForTesting' ,
209
211
get_ancestor_hash = get_block_hash_for_testing ,
210
212
)
213
+ ConstantinopleStateForTesting = ConstantinopleState .configure (
214
+ __name__ = 'ConstantinopleStateForTesting' ,
215
+ get_ancestor_hash = get_block_hash_for_testing ,
216
+ )
211
217
212
218
FrontierVMForTesting = FrontierVM .configure (
213
219
__name__ = 'FrontierVMForTesting' ,
@@ -234,6 +240,11 @@ def get_prev_hashes_testing(self, last_block_hash, db):
234
240
_state_class = ByzantiumStateForTesting ,
235
241
get_prev_hashes = get_prev_hashes_testing ,
236
242
)
243
+ ConstantinopleVMForTesting = ConstantinopleVM .configure (
244
+ __name__ = 'ConstantinopleVMForTesting' ,
245
+ _state_class = ConstantinopleStateForTesting ,
246
+ get_prev_hashes = get_prev_hashes_testing ,
247
+ )
237
248
238
249
239
250
@pytest .fixture
@@ -250,7 +261,7 @@ def fixture_vm_class(fixture_data):
250
261
elif fork_name == ForkName .Byzantium :
251
262
return ByzantiumVMForTesting
252
263
elif fork_name == ForkName .Constantinople :
253
- pytest . skip ( "Constantinople VM has not been implemented" )
264
+ return ConstantinopleVMForTesting
254
265
elif fork_name == ForkName .Metropolis :
255
266
pytest .skip ("Metropolis VM has not been implemented" )
256
267
else :
0 commit comments