From 58d66c40afbca3111dd5903f3d4e191d0b50bca3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Claus-Peter=20H=C3=BCbner?= Date: Mon, 13 Feb 2023 20:53:38 +0100 Subject: [PATCH] rework PR-comments --- dht-node/.env.dist | 2 -- dht-node/src/dht_node/index.test.ts | 3 +-- dht-node/src/dht_node/index.ts | 4 +++- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dht-node/.env.dist b/dht-node/.env.dist index 82050b2af..5d287ee1a 100644 --- a/dht-node/.env.dist +++ b/dht-node/.env.dist @@ -1,5 +1,3 @@ -CONFIG_VERSION=v2.2023-02-03 - # Database DB_HOST=localhost DB_PORT=3306 diff --git a/dht-node/src/dht_node/index.test.ts b/dht-node/src/dht_node/index.test.ts index 59e52149a..b7e36c783 100644 --- a/dht-node/src/dht_node/index.test.ts +++ b/dht-node/src/dht_node/index.test.ts @@ -44,11 +44,10 @@ const lookupResultMock = { token: Buffer.from(TEST_TOPIC), from: { id: Buffer.from('somone'), - foreign: true, host: '188.95.53.5', port: 63561, }, - to: { id: null, foreign: true, host: '83.53.31.27', port: 55723 }, + to: { id: null, host: '83.53.31.27', port: 55723 }, peers: [ { publicKey: Buffer.from('some-public-key'), diff --git a/dht-node/src/dht_node/index.ts b/dht-node/src/dht_node/index.ts index 2fd6cd1e7..dcbb222ee 100644 --- a/dht-node/src/dht_node/index.ts +++ b/dht-node/src/dht_node/index.ts @@ -200,11 +200,13 @@ async function writeHomeCommunityEnries(pubKey: any): Promise { }) try { // first remove privious existing homeCommunity entries + DbCommunity.createQueryBuilder().delete().where({ foreign: false }).execute() + /* const homeComs = await DbCommunity.find({ foreign: false }) if (homeComs.length > 0) { await DbCommunity.remove(homeComs) } - + */ homeApiVersions.forEach(async function (homeApi) { const homeCom = new DbCommunity() homeCom.foreign = false