1
0

blockchain.fork: better exception if datadir was deleted while running

This commit is contained in:
SomberNight
2020-02-04 19:04:38 +01:00
parent f545d2b716
commit 9d2629c5c3

View File

@@ -258,6 +258,7 @@ class Blockchain(Logger):
parent=parent,
forkpoint_hash=hash_header(header),
prev_hash=parent.get_hash(forkpoint-1))
self.assert_headers_file_available(parent.path())
open(self.path(), 'w+').close()
self.save_header(header)
# put into global dict. note that in some cases