mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-14 17:51:22 +00:00
chore: update pubsub (#801)
BREAKING CHANGE: pubsub signing policy properties were changed according to libp2p-interfaces changes to a single property. The emitSelf option default value was also modified to match the routers value
This commit is contained in:
committed by
Vasco Santos
parent
49fffda23c
commit
e50c6abcf2
@ -322,6 +322,8 @@ const MPLEX = require('libp2p-mplex')
|
||||
const { NOISE } = require('libp2p-noise')
|
||||
const GossipSub = require('libp2p-gossipsub')
|
||||
|
||||
const { SignaturePolicy } = require('libp2p-interfaces/src/pubsub/signature-policy')
|
||||
|
||||
const node = await Libp2p.create({
|
||||
modules: {
|
||||
transport: [TCP],
|
||||
@ -332,9 +334,8 @@ const node = await Libp2p.create({
|
||||
config: {
|
||||
pubsub: { // The pubsub options (and defaults) can be found in the pubsub router documentation
|
||||
enabled: true,
|
||||
emitSelf: true, // whether the node should emit to self on publish
|
||||
signMessages: true, // if messages should be signed
|
||||
strictSigning: true // if message signing should be required
|
||||
emitSelf: false, // whether the node should emit to self on publish
|
||||
globalSignaturePolicy: SignaturePolicy.StrictSign // message signing policy
|
||||
}
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user