Skip to content

Commit 670ece9

Browse files
committed
Merge branch 'mytonctrl2_dev' of github.com:ton-blockchain/mytonctrl into mytonctrl2_dev
2 parents 04b08d6 + bf0bf61 commit 670ece9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mytoncore/mytoncore.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -911,9 +911,9 @@ def GetConfig32(self):
911911
if "public_key:" in line:
912912
validatorAdnlAddr = parse(line, "adnl_addr:x", ')')
913913
pubkey = parse(line, "pubkey:x", ')')
914-
if config32["totalValidators"] > 1:
914+
try:
915915
validatorWeight = int(parse(line, "weight:", ' '))
916-
else:
916+
except ValueError:
917917
validatorWeight = int(parse(line, "weight:", ')'))
918918
buff = dict()
919919
buff["adnlAddr"] = validatorAdnlAddr
@@ -948,9 +948,9 @@ def GetConfig34(self):
948948
if "public_key:" in line:
949949
validatorAdnlAddr = parse(line, "adnl_addr:x", ')')
950950
pubkey = parse(line, "pubkey:x", ')')
951-
if config34["totalValidators"] > 1:
951+
try:
952952
validatorWeight = int(parse(line, "weight:", ' '))
953-
else:
953+
except ValueError:
954954
validatorWeight = int(parse(line, "weight:", ')'))
955955
buff = dict()
956956
buff["adnlAddr"] = validatorAdnlAddr

0 commit comments

Comments
 (0)