Skip to content

Commit

Permalink
Enable Constantinople State tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cburgdorf committed Aug 14, 2018
1 parent 2b00e9d commit 0bd5815
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/json-fixtures/test_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@
HomesteadVM,
SpuriousDragonVM,
ByzantiumVM,
ConstantinopleVM,
)
from eth.vm.forks.tangerine_whistle.state import TangerineWhistleState
from eth.vm.forks.frontier.state import FrontierState
from eth.vm.forks.homestead.state import HomesteadState
from eth.vm.forks.spurious_dragon.state import SpuriousDragonState
from eth.vm.forks.byzantium.state import ByzantiumState
from eth.vm.forks.constantinople.state import ConstantinopleState

from eth.rlp.headers import (
BlockHeader,
Expand Down Expand Up @@ -208,6 +210,10 @@ def get_prev_hashes_testing(self, last_block_hash, db):
__name__='ByzantiumStateForTesting',
get_ancestor_hash=get_block_hash_for_testing,
)
ConstantinopleStateForTesting = ConstantinopleState.configure(
__name__='ConstantinopleStateForTesting',
get_ancestor_hash=get_block_hash_for_testing,
)

FrontierVMForTesting = FrontierVM.configure(
__name__='FrontierVMForTesting',
Expand All @@ -234,6 +240,11 @@ def get_prev_hashes_testing(self, last_block_hash, db):
_state_class=ByzantiumStateForTesting,
get_prev_hashes=get_prev_hashes_testing,
)
ConstantinopleVMForTesting = ConstantinopleVM.configure(
__name__='ConstantinopleVMForTesting',
_state_class=ConstantinopleStateForTesting,
get_prev_hashes=get_prev_hashes_testing,
)


@pytest.fixture
Expand All @@ -250,7 +261,7 @@ def fixture_vm_class(fixture_data):
elif fork_name == ForkName.Byzantium:
return ByzantiumVMForTesting
elif fork_name == ForkName.Constantinople:
pytest.skip("Constantinople VM has not been implemented")
return ConstantinopleVMForTesting
elif fork_name == ForkName.Metropolis:
pytest.skip("Metropolis VM has not been implemented")
else:
Expand Down

0 comments on commit 0bd5815

Please sign in to comment.