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

Commit 70a653a

Browse files
committed
str -> bytes fix
1 parent 5c3a1af commit 70a653a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

ethereum/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def calc_difficulty(parent, timestamp, config=default_config):
5656
return o
5757

5858
# Given a parent state, initialize a block with the given arguments
59-
def mk_block_from_prevstate(chain, state=None, timestamp=None, coinbase='\x35'*20, extra_data='moo ha ha says the laughing cow.'):
59+
def mk_block_from_prevstate(chain, state=None, timestamp=None, coinbase=b'\x35'*20, extra_data='moo ha ha says the laughing cow.'):
6060
state = state or chain.state
6161
blk = Block(BlockHeader())
6262
now = timestamp or chain.time()

ethereum/meta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def apply_block(state, block):
4242
def make_head_candidate(chain, txqueue=None,
4343
parent=None,
4444
timestamp=None,
45-
coinbase='\x35'*20,
45+
coinbase=b'\x35'*20,
4646
extra_data='moo ha ha says the laughing cow.',
4747
min_gasprice=0):
4848
log.info('Creating head candidate')

ethereum/tests/test_chain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def mine_on_chain(chain, parent=None, transactions=[], coinbase=None, timestamp=
5555
txqueue.add_transaction(t)
5656
parent_timestamp = parent.timestamp if parent else chain.state.timestamp
5757
hc, _ = meta.make_head_candidate(chain, txqueue, parent,
58-
timestamp or parent_timestamp + 1, coinbase or '\x00'*20)
58+
timestamp or parent_timestamp + 1, coinbase or b'\x00'*20)
5959
assert hc.difficulty == 1
6060
m = ethpow.Miner(hc)
6161
rounds = 100

0 commit comments

Comments
 (0)