fix: pubsub configuration (#404)

* fix: add pubsub default config (#401)

License: MIT
Signed-off-by: Matthias Knopp <matthias-knopp@gmx.net>

* docs: add default pubsub config to README (#401)

License: MIT
Signed-off-by: Matthias Knopp <matthias-knopp@gmx.net>

* fix: pass config to provided PubSub (#401)

License: MIT
Signed-off-by: Matthias Knopp <matthias-knopp@gmx.net>

* docs: adapt pubsub/example for new config (#401)

License: MIT
Signed-off-by: Matthias Knopp <matthias-knopp@gmx.net>

* Update examples/pubsub/README.md

Co-Authored-By: Jacob Heun <jacobheun@gmail.com>

* test: add pubsub config tests (#401)

License: MIT
Signed-off-by: Matthias Knopp <matthias-knopp@gmx.net>
This commit is contained in:
a1300
2019-08-19 17:06:08 +02:00
committed by Jacob Heun
parent b294301456
commit b0f124b5ff
8 changed files with 169 additions and 31 deletions

View File

@ -124,7 +124,7 @@ class Libp2p extends EventEmitter {
// start pubsub
if (this._modules.pubsub && this._config.pubsub.enabled !== false) {
this.pubsub = pubsub(this, this._modules.pubsub)
this.pubsub = pubsub(this, this._modules.pubsub, this._config.pubsub)
}
// Attach remaining APIs