electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 5fef1e7980e6c9811448ad7d9fb6afa4460ac7fc
parent 36d52dfd5a60eba1469d08478d17ea713517ae0d
Author: SomberNight <somber.night@protonmail.com>
Date:   Mon, 19 Mar 2018 01:26:57 +0100

close #4125

perhaps not proper fix but at least more descriptive exception text

Diffstat:
Mlib/blockchain.py | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/lib/blockchain.py b/lib/blockchain.py @@ -255,6 +255,10 @@ class Blockchain(util.PrintError): with open(name, 'rb') as f: f.seek(delta * 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: return None return deserialize_header(h, height)