Skip to content

Commit 1b2b8b5

Browse files
committed
fix check_disable in collator mode
1 parent caf117e commit 1b2b8b5

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

modules/collator.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,12 @@ def check_enable(cls, ton: "MyTonCore"):
178178
f'Use `disable_mode validator` first.')
179179

180180
def check_disable(self):
181-
if not self.get_collators():
182-
return
183-
text = f"{{red}}WARNING: This node probably has active collator working and synchronizes not the whole blockchain, thus it may not work as expected in other node modes. Make sure you know what you're doing.{{endc}}\n"
181+
have_collators_text = 'has active collator working and ' if self.get_collators() else ''
182+
text = f"{{red}}WARNING: This node {have_collators_text}probably synchronizes not the whole blockchain, thus it may not work as expected in other node modes. Make sure you know what you're doing.{{endc}}\n"
184183
color_print(text)
185184
if input("Continue anyway? [Y/n]\n").strip().lower() not in ('y', ''):
186-
print('aborted.')
187-
return
185+
raise Exception('aborted.')
186+
188187

189188
def add_console_commands(self, console):
190189
console.AddItem("setup_collator", self.setup_collator, self.local.translate("setup_collator_cmd"))

0 commit comments

Comments
 (0)