From 13738cce3bdc7e4e55f642ec0a3e569c6f973511 Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Sun, 22 Jul 2018 14:55:33 +0100 Subject: [PATCH 1/2] fix: add default datastore config --- src/core/runtime/config-nodejs.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/core/runtime/config-nodejs.js b/src/core/runtime/config-nodejs.js index 5b301d1e20..797807e4b6 100644 --- a/src/core/runtime/config-nodejs.js +++ b/src/core/runtime/config-nodejs.js @@ -9,6 +9,37 @@ module.exports = () => ({ API: '/ip4/127.0.0.1/tcp/5002', Gateway: '/ip4/127.0.0.1/tcp/9090' }, + Datastore: { + StorageGCWatermark: 90, + GCPeriod: '1h', + BloomFilterSize: 0, + Spec: { + type: 'mount', + mounts: [ + { + mountpoint: '/blocks', + type: 'measure', + prefix: 'flatfs.datastore', + child: { + type: 'flatfs', + path: 'blocks', + sync: true, + shardFunc: '/repo/flatfs/shard/v1/next-to-last/2' + } + }, + { + mountpoint: '/', + type: 'measure', + prefix: 'leveldb.datastore', + child: { + type: 'levelds', + path: 'datastore', + compression: 'none' + } + } + ] + } + }, Discovery: { MDNS: { Enabled: true, From 461e9953d03b044bc4e3bc035867805cda715641 Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Sun, 29 Jul 2018 22:46:36 +0100 Subject: [PATCH 2/2] chore: removed unused configs --- src/core/runtime/config-nodejs.js | 3 --- test/fixtures/go-ipfs-repo/version | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/core/runtime/config-nodejs.js b/src/core/runtime/config-nodejs.js index 797807e4b6..ec03e71c8e 100644 --- a/src/core/runtime/config-nodejs.js +++ b/src/core/runtime/config-nodejs.js @@ -10,9 +10,6 @@ module.exports = () => ({ Gateway: '/ip4/127.0.0.1/tcp/9090' }, Datastore: { - StorageGCWatermark: 90, - GCPeriod: '1h', - BloomFilterSize: 0, Spec: { type: 'mount', mounts: [ diff --git a/test/fixtures/go-ipfs-repo/version b/test/fixtures/go-ipfs-repo/version index 62f9457511..c7930257df 100644 --- a/test/fixtures/go-ipfs-repo/version +++ b/test/fixtures/go-ipfs-repo/version @@ -1 +1 @@ -6 \ No newline at end of file +7 \ No newline at end of file