Fix KeyError on incorrect genesis hash (#224)

Fix KeyError that occurs when creating an exception for an incorrect genesis hash.
This commit is contained in:
Kefkius 2017-08-19 18:31:55 -04:00 committed by Neil
parent b4ac4b6a05
commit 59d8421c87

View File

@ -315,7 +315,7 @@ class DB(util.LoggedClass):
genesis_hash = genesis_hash.decode()
if genesis_hash != self.coin.GENESIS_HASH:
raise self.DBError('DB genesis hash {} does not match coin {}'
.format(state['genesis_hash'],
.format(genesis_hash,
self.coin.GENESIS_HASH))
self.db_height = state['height']
self.db_tx_count = state['tx_count']