Skip to content

Commit

Permalink
feat: remove pubsub flags (#366)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: pubsub flags for in-proc daemons will not set values anymore
  • Loading branch information
vasco-santos authored and hugomrdias committed Sep 5, 2019
1 parent 4dd13b4 commit 3d4b943
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"dirty-chai": "^2.0.1",
"go-ipfs-dep": "~0.4.22",
"husky": "^3.0.4",
"ipfs": "ipfs/js-ipfs#master",
"ipfs": "~0.37.1",
"is-running": "^2.1.0",
"lint-staged": "^9.2.5",
"proxyquire": "^2.1.3",
Expand Down
11 changes: 1 addition & 10 deletions src/ipfsd-in-proc.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,11 @@ class InProc extends EventEmitter {
this.bits = this.opts.initOptions ? this.opts.initOptions.bits : null

this.opts.EXPERIMENTAL = defaultsDeep({}, opts.EXPERIMENTAL, {
pubsub: false,
sharding: false
})
this.opts.pubsub = defaultsDeep({}, opts.pubsub, {
enabled: false
})

this.opts.args.forEach((arg) => {
if (arg === '--enable-pubsub-experiment') {
this.opts.EXPERIMENTAL.pubsub = true
} else if (arg === '--enable-pubsub') {
this.opts.pubsub.enabled = true
} else if (arg === '--enable-sharding-experiment') {
if (arg === '--enable-sharding-experiment') {
this.opts.EXPERIMENTAL.sharding = true
} else if (arg === '--enable-namesys-pubsub') {
this.opts.EXPERIMENTAL.ipnsPubsub = true
Expand All @@ -71,7 +63,6 @@ class InProc extends EventEmitter {
offline: this.opts.offline,
EXPERIMENTAL: this.opts.EXPERIMENTAL,
libp2p: this.opts.libp2p,
pubsub: this.opts.pubsub,
config: this.opts.config,
relay: this.opts.relay
})
Expand Down
2 changes: 1 addition & 1 deletion test/spawn-options.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ describe('Spawn options', function () {
this.timeout(20 * 1000)

const options = {
args: [fOpts.type !== 'go' ? '--enable-pubsub' : '--enable-pubsub-experiment'],
args: ['--enable-namesys-pubsub'],
initOptions: { bits: fOpts.bits, profile: 'test' }
}

Expand Down

0 comments on commit 3d4b943

Please sign in to comment.