Skip to content

Commit b0865c6

Browse files
committed
Handle sealEngine in blockchain tests
1 parent 375028c commit b0865c6

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

eth/tools/fixtures/helpers.py

+6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010

1111
from eth import MainnetChain
1212
from eth.db.atomic import AtomicDB
13+
from eth.tools.builder.chain import (
14+
disable_pow_check,
15+
)
1316
from eth.utils.state import (
1417
diff_account_db,
1518
)
@@ -156,6 +159,9 @@ def new_chain_from_fixture(fixture, chain_cls=MainnetChain):
156159
vm_configuration=vm_config,
157160
)
158161

162+
if 'sealEngine' in fixture and fixture['sealEngine'] == 'NoProof':
163+
ChainFromFixture = disable_pow_check(ChainFromFixture)
164+
159165
return ChainFromFixture.from_genesis(
160166
base_db,
161167
genesis_params=genesis_params_from_fixture(fixture),

eth/tools/fixtures/normalization.py

+3
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,9 @@ def normalize_blockchain_fixtures(fixture):
495495
'network': fixture['network'],
496496
}
497497

498+
if 'sealEngine' in fixture:
499+
normalized_fixture['sealEngine'] = fixture['sealEngine']
500+
498501
if 'genesisRLP' in fixture:
499502
normalized_fixture['genesisRLP'] = decode_hex(fixture['genesisRLP'])
500503

0 commit comments

Comments
 (0)