blockchain.fork: better exception if datadir was deleted while running
This commit is contained in:
@@ -258,6 +258,7 @@ class Blockchain(Logger):
|
|||||||
parent=parent,
|
parent=parent,
|
||||||
forkpoint_hash=hash_header(header),
|
forkpoint_hash=hash_header(header),
|
||||||
prev_hash=parent.get_hash(forkpoint-1))
|
prev_hash=parent.get_hash(forkpoint-1))
|
||||||
|
self.assert_headers_file_available(parent.path())
|
||||||
open(self.path(), 'w+').close()
|
open(self.path(), 'w+').close()
|
||||||
self.save_header(header)
|
self.save_header(header)
|
||||||
# put into global dict. note that in some cases
|
# put into global dict. note that in some cases
|
||||||
|
|||||||
Reference in New Issue
Block a user