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

Commit fb02673

Browse files
committed
use byte strings for dictionary keys
1 parent 0e6a8fc commit fb02673

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ethereum/ethpow.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ def mine(block_number, difficulty, mining_hash, start_nonce=0, rounds=1000):
114114
for i in range(1, rounds + 1):
115115
bin_nonce = utils.zpad(utils.int_to_big_endian((nonce + i) & TT64M1), 8)
116116
o = hashimoto_light(block_number, cache, mining_hash, bin_nonce)
117-
if o["result"] <= target:
117+
if o[b"result"] <= target:
118118
log.debug("nonce found")
119119
assert len(bin_nonce) == 8
120-
assert len(o["mix digest"]) == 32
121-
return bin_nonce, o["mix digest"]
120+
assert len(o[b"mix digest"]) == 32
121+
return bin_nonce, o[b"mix digest"]
122122
return None, None

0 commit comments

Comments
 (0)