From 0ee2ac001cf0d846144c786afa2cec48ba45daf4 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Thu, 23 Apr 2020 08:55:07 +0100 Subject: [PATCH] fix: ipfs daemon flags License: MIT Signed-off-by: Henrique Dias --- src/common/store.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/common/store.js b/src/common/store.js index a5b7ffb6f..d68bb3214 100644 --- a/src/common/store.js +++ b/src/common/store.js @@ -3,7 +3,7 @@ const Store = require('electron-store') const store = new Store() -if (store.get('version') !== 5) { +if (store.get('version', 0) < 5) { store.clear() // default config @@ -17,6 +17,16 @@ if (store.get('version') !== 5) { store.set('version', 5) } +if (store.get('version', 0) !== 6) { + store.set('ipfsConfig.flags', [ + '--migrate', + '--enable-gc', + '--routing', 'dhtclient' + ]) + + store.set('version', 6) +} + if (!store.get('language')) { store.set('language', (electron.app || electron.remote.app).getLocale()) }