Skip to content

Commit e5d00f3

Browse files
committed
bugfix
bugfix bugfix
1 parent d2c7a79 commit e5d00f3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mytoncore/mytoncore.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2715,11 +2715,11 @@ def check_adnl(self):
27152715
url = 'http://45.129.96.53/adnl_check'
27162716
try:
27172717
data = self.get_local_adnl_data()
2718-
response = requests.post(url, json=data, timeout=3).json()
2718+
response = requests.post(url, json=data, timeout=5).json()
27192719
except Exception as e:
2720-
self.local.add_log(f'Failed to check adnl connection: {type(e)}: {e}')
2720+
self.local.add_log(f'Failed to check adnl connection: {type(e)}: {e}', 'error')
27212721
return False
2722-
result = response.json().get("ok")
2722+
result = response.get("ok")
27232723
if not result:
27242724
self.local.add_log(f'Failed to check adnl connection to local node: {response.get("message")}', 'error')
27252725
return result
@@ -2733,14 +2733,14 @@ def int2ip(dec):
27332733

27342734
vconfig = self.GetValidatorConfig()
27352735

2736-
data = {"ip": int2ip(vconfig["addrs"][0]["ip"]), "port": vconfig["addrs"][0]["port"]}
2736+
data = {"host": int2ip(vconfig["addrs"][0]["ip"]), "port": vconfig["addrs"][0]["port"]}
27372737

27382738
dht_id = vconfig["dht"][0]["id"]
27392739
dht_id_hex = base64.b64decode(dht_id).hex().upper()
27402740

27412741
result = self.validatorConsole.Run(f"exportpub {dht_id_hex}")
27422742
pubkey = parse(result, "got public key: ", "\n")
2743-
data["pubkey"] = base64.b64encode(base64.b64decode(pubkey)[4:])
2743+
data["pubkey"] = base64.b64encode(base64.b64decode(pubkey)[4:]).decode()
27442744
return data
27452745
#end define
27462746

0 commit comments

Comments
 (0)