Exemple #1
0
    get_ancestor_hash=get_block_hash_for_testing,
)

FrontierVMForTesting = FrontierVM.configure(
    name='FrontierVMForTesting',
    _state_class=FrontierVMStateForTesting,
    get_prev_hashes=get_prev_hashes_testing,
)
HomesteadVMForTesting = HomesteadVM.configure(
    name='HomesteadVMForTesting',
    _state_class=HomesteadVMStateForTesting,
    get_prev_hashes=get_prev_hashes_testing,
)
TangerineWhistleVMForTesting = TangerineWhistleVM.configure(
    name='TangerineWhistleVMForTesting',
    _state_class=TangerineWhistleVMStateForTesting,
    get_prev_hashes=get_prev_hashes_testing,
)
SpuriousDragonVMForTesting = SpuriousDragonVM.configure(
    name='SpuriousDragonVMForTesting',
    _state_class=SpuriousDragonVMStateForTesting,
    get_prev_hashes=get_prev_hashes_testing,
)
ByzantiumVMForTesting = ByzantiumVM.configure(
    name='ByzantiumVMForTesting',
    _state_class=ByzantiumVMStateForTesting,
    get_prev_hashes=get_prev_hashes_testing,
)


@pytest.fixture
Exemple #2
0
    elif block_number < self.block.header.block_number - 256:
        return b''
    else:
        return keccak("{0}".format(block_number))


FrontierVMForTesting = FrontierVM.configure(
    name='FrontierVMForTesting',
    get_ancestor_hash=get_block_hash_for_testing,
)
HomesteadVMForTesting = HomesteadVM.configure(
    name='HomesteadVMForTesting',
    get_ancestor_hash=get_block_hash_for_testing,
)
TangerineWhistleVMForTesting = TangerineWhistleVM.configure(
    name='TangerineWhistleVMForTesting',
    get_ancestor_hash=get_block_hash_for_testing,
)
SpuriousDragonVMForTesting = SpuriousDragonVM.configure(
    name='SpuriousDragonVMForTesting',
    get_ancestor_hash=get_block_hash_for_testing,
)
ByzantiumVMForTesting = ByzantiumVM.configure(
    name='ByzantiumVMForTesting',
    get_ancestor_hash=get_block_hash_for_testing,
)


@pytest.fixture
def fixture_vm_class(fixture_data):
    _, _, fork_name, _ = fixture_data
    if fork_name == 'Frontier':
Exemple #3
0
VMStateForTesting = VMState.configure(
    name='VMStateForTesting',
    get_ancestor_hash=get_block_hash_for_testing,
)

FrontierVMForTesting = FrontierVM.configure(
    name='FrontierVMForTesting',
    _state_class=VMStateForTesting,
)
HomesteadVMForTesting = HomesteadVM.configure(
    name='HomesteadVMForTesting',
    _state_class=VMStateForTesting,
)
TangerineWhistleVMForTesting = TangerineWhistleVM.configure(
    name='TangerineWhistleVMForTesting',
    _state_class=VMStateForTesting,
)
SpuriousDragonVMForTesting = SpuriousDragonVM.configure(
    name='SpuriousDragonVMForTesting',
    _state_class=VMStateForTesting,
)
ByzantiumVMForTesting = ByzantiumVM.configure(
    name='ByzantiumVMForTesting',
    _state_class=VMStateForTesting,
)


@pytest.fixture
def fixture_vm_class(fixture_data):
    _, _, fork_name, _ = fixture_data
    if fork_name == 'Frontier':
Exemple #4
0
    get_ancestor_hash=get_block_hash_for_testing,
)

FrontierVMForTesting = FrontierVM.configure(
    name='FrontierVMForTesting',
    _state_class=FrontierVMStateForTesting,
    get_prev_hashes=get_prev_hashes_testing,
)
HomesteadVMForTesting = HomesteadVM.configure(
    name='HomesteadVMForTesting',
    _state_class=HomesteadVMStateForTesting,
    get_prev_hashes=get_prev_hashes_testing,
)
TangerineWhistleVMForTesting = TangerineWhistleVM.configure(
    name='TangerineWhistleVMForTesting',
    _state_class=TangerineWhistleVMStateForTesting,
    get_prev_hashes=get_prev_hashes_testing,
)
SpuriousDragonVMForTesting = SpuriousDragonVM.configure(
    name='SpuriousDragonVMForTesting',
    _state_class=SpuriousDragonVMStateForTesting,
    get_prev_hashes=get_prev_hashes_testing,
)
ByzantiumVMForTesting = ByzantiumVM.configure(
    name='ByzantiumVMForTesting',
    _state_class=ByzantiumVMStateForTesting,
    get_prev_hashes=get_prev_hashes_testing,
)


@pytest.fixture