Skip to content

Commit 4f66db8

Browse files
committed
Merge remote-tracking branch 'tonblkch/dev' into dev
2 parents f27e1fb + 7adf843 commit 4f66db8

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

modules/alert_bot.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ def setup_alert_bot(self, args):
279279
self.send_welcome_message()
280280
self.ton.local.db['BotToken'] = args[0]
281281
self.ton.local.db['ChatId'] = args[1]
282+
self.ton.local.save()
282283
color_print("setup_alert_bot - {green}OK{endc}")
283284
except Exception as e:
284285
self.local.add_log(f"Error while sending welcome message: {e}", "error")

mytoncore/liteclient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def Run(self, cmd, **kwargs):
2222
if index is not None:
2323
index = str(index)
2424
args += ["-i", index]
25-
elif useLocalLiteServer and self.pubkeyPath and validator_status.out_of_sync and validator_status.out_of_sync < 20:
25+
elif useLocalLiteServer and self.pubkeyPath and validator_status.out_of_sync is not None and validator_status.out_of_sync < 20:
2626
args = [self.appPath, "--addr", self.addr, "--pub", self.pubkeyPath, "--verbosity", "0", "--cmd", cmd]
2727
else:
2828
liteServers = self.local.db.get("liteServers")

mytoncore/mytoncore.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ def GetSeqno(self, wallet):
178178
seqno = seqno.replace(' ', '')
179179
seqno = parse(seqno, '[', ']')
180180
seqno = int(seqno)
181+
self.local.add_log(f"GetSeqno: seqno is {seqno}", "debug")
181182
return seqno
182183
#end define
183184

mytonctrl/mytonctrl.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -345,11 +345,6 @@ def Update(local, args):
345345
#end define
346346

347347
def Upgrade(ton, args):
348-
force = False
349-
if '--force' in args:
350-
force = True
351-
args.remove('--force')
352-
353348
repo = "ton"
354349
author, repo, branch = check_git(args, repo, "upgrade")
355350

@@ -372,13 +367,15 @@ def Upgrade(ton, args):
372367
ton.SetSettings("validatorConsole", validatorConsole)
373368

374369
clang_version = get_clang_major_version()
375-
if (clang_version is None or clang_version < 16) and not force:
376-
text = "{red}Error: clang version 16 or higher is required for TON Node software upgrade.{endc}\n"
370+
if clang_version is None or clang_version < 16:
371+
text = "{yellow}Warning: clang version 16 or higher is required for TON Node software upgrade.{endc}\n"
377372
if clang_version is None:
378373
text += "Could not check clang version.\n If you are sure that clang version is 16 or higher, use --force option.\n"
379-
text += "For clang update check the following instructions: https://gist.github.com/neodix42/e4b1b68d2d5dd3dec75b5221657f05d7"
374+
text += "For clang update check the following instructions: https://gist.github.com/neodix42/e4b1b68d2d5dd3dec75b5221657f05d7\n"
380375
color_print(text)
381-
return
376+
if input("Continue with upgrade anyway? [Y/n]\n").strip().lower() not in ('y', ''):
377+
print('aborted.')
378+
return
382379

383380
# Run script
384381
upgrade_script_path = pkg_resources.resource_filename('mytonctrl', 'scripts/upgrade.sh')
@@ -417,7 +414,8 @@ def get_clang_major_version():
417414
return None
418415

419416
return int(major_version)
420-
except Exception:
417+
except Exception as e:
418+
print(f"Error checking clang version: {type(e)}: {e}")
421419
return None
422420

423421
def rollback_to_mtc1(local, ton, args):

0 commit comments

Comments
 (0)