1
0

mark 'blockchain_headers' file as sparse on windows

based on fyookball/electrum@647a6cc26d
This commit is contained in:
SomberNight
2018-09-19 22:09:54 +02:00
parent 855a70bc66
commit cedd518aea
2 changed files with 12 additions and 1 deletions

View File

@@ -675,9 +675,10 @@ class Network(PrintError):
length = 80 * len(constants.net.CHECKPOINTS) * 2016
if not os.path.exists(filename) or os.path.getsize(filename) < length:
with open(filename, 'wb') as f:
if length>0:
if length > 0:
f.seek(length-1)
f.write(b'\x00')
util.ensure_sparse_file(filename)
with b.lock:
b.update_size()