Skip to content

Commit 8accb47

Browse files
authored
Merge pull request #457 from yungwine/storage
fix archive sync from zerostate
2 parents 64a4fef + 25aecda commit 8accb47

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mytoninstaller/settings.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,12 @@ def download_bag(local, bag_id: str, download_all: bool = True, download_file: t
174174

175175
def update_init_block(local, seqno: int):
176176
local.add_log(f"Editing init block in {local.buffer.global_config_path}", "info")
177-
data = get_block_from_toncenter(local, workchain=-1, seqno=seqno)
178177
with open(local.buffer.global_config_path, 'r') as f:
179178
config = json.load(f)
179+
if seqno != 0:
180+
data = get_block_from_toncenter(local, workchain=-1, seqno=seqno)
181+
else:
182+
data = config['validator']['zero_state']
180183
config['validator']['init_block']['seqno'] = seqno
181184
config['validator']['init_block']['file_hash'] = data['file_hash']
182185
config['validator']['init_block']['root_hash'] = data['root_hash']

0 commit comments

Comments
 (0)