From fbfbb335cc80369b37adaa1f76ed69921e914b25 Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Thu, 13 Jun 2024 17:16:27 +0200 Subject: [PATCH] Remove logging --- main.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index 7c89c78..3e1434a 100644 --- a/main.js +++ b/main.js @@ -188,15 +188,14 @@ createPeer({ path }).then(({ peer, account: globalAccountID }) => { pull( pull.count(), pull.asyncMap((i, cb) => { - // ideally we'd detect peer.db.onRecordAdded here but i couldn't figure out how to convert the obz into a pull stream - setTimeout(() => cb(null, i), 500) + // ideally we'd detect peer.db.onRecordAdded here instead of polling but i couldn't figure out how to convert the obz into a pull stream + setTimeout(() => cb(null, i), 2000) }), ), ]) ) - for await (const [connections, i] of awaitable(recordsAdded)) { - console.log('got conns', connections, i) + for await (const [connections] of awaitable(recordsAdded)) { const connInfo = await Promise.all(connections.map(async (conn) => { const [multiaddr] = conn const parts = [...multiaddr.matchAll(/\w{44}/g)].map(r => r[0])