Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit b5e8fa7

Browse files
committed
Merge branch 'develop' of github.com:ethereum/pyethereum into develop
2 parents 359cc9e + afa24f2 commit b5e8fa7

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,6 @@ open('output.json', 'w').write(json.dumps(post, indent=4))
238238

239239
To make a test filler file instead, do `post = t.mk_state_test_postfill(c, pre, True)`.
240240

241-
## Licence
241+
## License
242242

243-
See LICENCE
243+
See [LICENSE](LICENSE)

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ To make your own state tests, use the tester module as follows:
365365
To make a test filler file instead, do
366366
``post = t.mk_state_test_postfill(c, pre, True)``.
367367

368-
Licence
368+
License
369369
-------
370370

371-
See LICENCE
371+
See `LICENSE <LICENSE>`_

ethereum/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
# (block.gas_used * 6 / 5) / 1024
2828
GASLIMIT_EMA_FACTOR=1024,
2929
GASLIMIT_ADJMAX_FACTOR=1024,
30+
BLOCK_GAS_LIMIT=4712388,
3031
BLKLIM_FACTOR_NOM=3,
3132
BLKLIM_FACTOR_DEN=2,
3233
# Network ID

ethereum/genesis_helpers.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,12 @@ def mk_genesis_block(env, **kwargs):
107107

108108

109109
def mk_basic_state(alloc, header=None, env=None, executing_on_head=False):
110-
state = State(env=env or Env(), executing_on_head=executing_on_head)
110+
env = env or Env()
111+
state = State(env=env, executing_on_head=executing_on_head)
111112
if not header:
112113
header = {
113-
"number": 0, "gas_limit": 4712388, "gas_used": 0,
114-
"timestamp": 1467446877, "difficulty": 1,
114+
"number": 0, "gas_limit": env.config['BLOCK_GAS_LIMIT'],
115+
"gas_used": 0, "timestamp": 1467446877, "difficulty": 1,
115116
"uncles_hash": '0x'+encode_hex(BLANK_UNCLES_HASH)
116117
}
117118
h = BlockHeader(number=parse_as_int(header['number']),

ethereum/pow/chain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def __init__(self, genesis=None, env=None, \
6060
print('Initializing chain from new state based on alloc')
6161
self.state = mk_basic_state(genesis, {
6262
"number": kwargs.get('number', 0),
63-
"gas_limit": kwargs.get('gas_limit', 4712388),
63+
"gas_limit": kwargs.get('gas_limit', self.env.config['BLOCK_GAS_LIMIT']),
6464
"gas_used": kwargs.get('gas_used', 0),
6565
"timestamp": kwargs.get('timestamp', 1467446877),
6666
"difficulty": kwargs.get('difficulty', 2**25),

0 commit comments

Comments
 (0)