if no headers, best block hash is genesis

This commit is contained in:
Victor Shyba 2019-06-26 03:54:44 -03:00 committed by Lex Berezhny
parent dcb1e53aba
commit f2944fd33b

View file

@ -184,6 +184,8 @@ class LbryWalletManager(BaseWalletManager):
len(set(receiving_addresses).difference(set(migrated_receiving))))
def get_best_blockhash(self):
if len(self.ledger.headers) <= 0:
return self.ledger.genesis_hash
return self.ledger.headers.hash(self.ledger.headers.height).decode()
def get_unused_address(self):