mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-01 09:45:18 +00:00
close #4125
perhaps not proper fix but at least more descriptive exception text
This commit is contained in:
parent
36d52dfd5a
commit
5fef1e7980
1 changed files with 4 additions and 0 deletions
|
@ -255,6 +255,10 @@ class Blockchain(util.PrintError):
|
||||||
with open(name, 'rb') as f:
|
with open(name, 'rb') as f:
|
||||||
f.seek(delta * 80)
|
f.seek(delta * 80)
|
||||||
h = f.read(80)
|
h = f.read(80)
|
||||||
|
elif not os.path.exists(util.get_headers_dir(self.config)):
|
||||||
|
raise Exception('Electrum datadir does not exist. Was it deleted while running?')
|
||||||
|
else:
|
||||||
|
raise Exception('Cannot find headers file but datadir is there. Should be at {}'.format(name))
|
||||||
if h == bytes([0])*80:
|
if h == bytes([0])*80:
|
||||||
return None
|
return None
|
||||||
return deserialize_header(h, height)
|
return deserialize_header(h, height)
|
||||||
|
|
Loading…
Add table
Reference in a new issue