From 7bd0a7211312ed58e4d268443edcf3c869389794 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Tue, 6 Dec 2022 17:03:30 -0500 Subject: [PATCH] *Move relay identity log to swarm --- src/modules/dns.ts | 5 ----- src/modules/swarm.ts | 6 ++++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/modules/dns.ts b/src/modules/dns.ts index 5249519..4bc5b0d 100644 --- a/src/modules/dns.ts +++ b/src/modules/dns.ts @@ -50,11 +50,6 @@ export async function start() { pack(`${config.str("domain")}:${config.uint("port")}`) ); - log.info( - "Relay Identity is", - Buffer.from(swarm.dht.defaultKeyPair.publicKey).toString("hex") - ); - cron.schedule("0 * * * *", ipUpdate); } diff --git a/src/modules/swarm.ts b/src/modules/swarm.ts index 9b7fe42..3659e27 100644 --- a/src/modules/swarm.ts +++ b/src/modules/swarm.ts @@ -16,6 +16,7 @@ import { // @ts-ignore import sodium from "sodium-universal"; import b4a from "b4a"; +import log from "loglevel"; const LUMEWEB = b4a.from("lumeweb"); export const LUMEWEB_TOPIC_HASH = b4a.allocUnsafe(32); @@ -46,6 +47,11 @@ export async function start() { await node.listen(); node.join(LUMEWEB_TOPIC_HASH); + log.info( + "Relay Identity is", + b4a.from(node.dht.defaultKeyPair.publicKey).toString("hex") + ); + return node; }