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

Commit 3a0d4d7

Browse files
committed
Fixed bug with Chain
1 parent 5d893a1 commit 3a0d4d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ethereum/pow/chain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def add_block(self, block):
254254
except (AssertionError, KeyError, ValueError, InvalidTransaction, VerificationFailed) as e: # FIXME add relevant exceptions here
255255
log.info('Block %s with parent %s invalid, reason: %s' % (encode_hex(block.header.hash), encode_hex(block.header.prevhash), e))
256256
return False
257-
self.db.put(b'block:' + str(block.header.number), block.header.hash)
257+
self.db.put(b'block:' + utils.to_string(str(block.header.number)), block.header.hash)
258258
self.db.put(b'state:' + block.header.hash, self.state.trie.root_hash)
259259
block_score = self.get_score(block) # side effect: put 'score:' cache in db
260260
self.head_hash = block.header.hash

0 commit comments

Comments
 (0)