Make pubsub option emitSelf configurable #401
Labels
exp/novice
Someone with a little familiarity can pick up
kind/bug
A bug in existing code (including security flaws)
P2
Medium: Good to have, but can wait until someone steps up
status/ready
Ready to be worked
First and foremost: Thanks for this great package and the hard work! 👍
Type: Feature
Severity: Low
Description:
Currently is the option emitSelf for
pubsub
packages (libp2p/js-libp2p-floodsub and ChainSafe/gossipsub-js) hardcoded in the code.js-libp2p/src/pubsub.js
Line 10 in fd738f9
Both
pubsub
packages support the emitSelf option. It would be nice to add the option to specify if self-published messages should be received.Example:
export class Bundle extends libp2p { constructor(_options) { const defaults = { modules: { transport: [TCP], streamMuxer: [Mplex], connEncryption: [SECIO], peerDiscovery: [Bootstrap], dht: DHT, pubsub: GossipSub, }, config: { pubsub: { enabled: true, + emitSelf: false, }, }, }; super(defaultsDeep(_options, defaults)); }
Steps to reproduce the error:
The text was updated successfully, but these errors were encountered: