From 3b6a3ca028805d88f4e7bc634ab2327bd9a1ebf1 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Tue, 23 Jun 2020 17:07:53 +0530 Subject: [PATCH] New boostrap JSON format --- src/toxcore/bootstrap.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/toxcore/bootstrap.nim b/src/toxcore/bootstrap.nim index 800186a..463a234 100644 --- a/src/toxcore/bootstrap.nim +++ b/src/toxcore/bootstrap.nim @@ -14,7 +14,7 @@ proc bootstrapFromSpof*(tox: Tox; ipv4 = true; ipv6 = true) {.async.} = txt = await http.getContent(spofNodeList) js = parseJson(txt) close http - for num, node in js.pairs: + for node in js["nodes"]: try: let ip4 = node["ipv4"].getStr("-") @@ -26,4 +26,4 @@ proc bootstrapFromSpof*(tox: Tox; ipv4 = true; ipv6 = true) {.async.} = if ipv6 and ip6 != "-": tox.bootstrap(ip6, key, port) except: - discard + echo "failed to parse ", spofNodeList -- 2.30.2