1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00

Update snode-pin.py

use for each for printing addresses
This commit is contained in:
majestrate 2023-04-20 13:09:12 -04:00 committed by GitHub
parent 43152fd689
commit c8657ccf85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,10 +32,10 @@ for snode in resp.json().get("result").get("service_node_states", []):
snodes[addr].add(snode.get("pubkey_ed25519"))
# print the config snippet to stdout
for oper in snodes:
for oper, addrs in snodes:
print(f"# pin edges to use oper {oper}")
print("[network]")
for addr in snodes.get(oper):
for addr in addrs:
# convert base16 (hex) to zbase32 and add .snode suffix
print(
"strict-connect={}.snode".format(