From 5f278e853a0069a42291d481b2d6c4d0c9a8883c Mon Sep 17 00:00:00 2001 From: Daniel N <2color@users.noreply.github.com> Date: Fri, 20 May 2022 14:12:47 +0200 Subject: [PATCH 1/2] chore: remove hard-coded dht client mode fixes #1859 --- src/common/store.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/common/store.js b/src/common/store.js index a756df94c..d1d7b511a 100644 --- a/src/common/store.js +++ b/src/common/store.js @@ -8,8 +8,7 @@ const defaults = { flags: [ '--agent-version-suffix=desktop', '--migrate', - '--enable-gc', - '--routing=dhtclient' + '--enable-gc' ] }, language: (electron.app || electron.remote.app).getLocale(), From af3b80280603901e6fd5fda503d175ab91b714ae Mon Sep 17 00:00:00 2001 From: Daniel N <2color@users.noreply.github.com> Date: Fri, 20 May 2022 14:14:00 +0200 Subject: [PATCH 2/2] chore: migration to remove hard-coded dht client Fixes #1859 --- src/common/store.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/common/store.js b/src/common/store.js index d1d7b511a..828a34eaa 100644 --- a/src/common/store.js +++ b/src/common/store.js @@ -51,6 +51,16 @@ const migrations = { flags.push('--routing=dhtclient') store.set('ipfsConfig.flags', flags) } + }, + '>=0.20.6': store => { + let flags = store.get('ipfsConfig.flags', []) + + // use default instead of hard-coded dhtclient + const dhtClientFlag = '--routing=dhtclient' + if (flags.includes(dhtClientFlag)) { + flags = flags.filter(f => f !== dhtClientFlag) + store.set('ipfsConfig.flags', flags) + } } }