mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-04-03 16:21:04 +00:00
feat: sign pubsub messages (#362)
* fix: forward pubsub publish callback to floodsub chore: update floodsub version * test: add random walk delay to config * chore: update floodsub
This commit is contained in:
parent
71dcaafcac
commit
40978a1940
@ -43,7 +43,7 @@
|
|||||||
"err-code": "^1.1.2",
|
"err-code": "^1.1.2",
|
||||||
"fsm-event": "^2.1.0",
|
"fsm-event": "^2.1.0",
|
||||||
"libp2p-connection-manager": "~0.1.0",
|
"libp2p-connection-manager": "~0.1.0",
|
||||||
"libp2p-floodsub": "~0.15.8",
|
"libp2p-floodsub": "~0.16.0",
|
||||||
"libp2p-ping": "~0.8.5",
|
"libp2p-ping": "~0.8.5",
|
||||||
"libp2p-switch": "~0.42.9",
|
"libp2p-switch": "~0.42.9",
|
||||||
"libp2p-websockets": "~0.12.2",
|
"libp2p-websockets": "~0.12.2",
|
||||||
|
@ -63,9 +63,7 @@ module.exports = (node) => {
|
|||||||
return nextTick(callback, errCode(new Error('data must be a Buffer'), 'ERR_DATA_IS_NOT_A_BUFFER'))
|
return nextTick(callback, errCode(new Error('data must be a Buffer'), 'ERR_DATA_IS_NOT_A_BUFFER'))
|
||||||
}
|
}
|
||||||
|
|
||||||
floodSub.publish(topic, data)
|
floodSub.publish(topic, data, callback)
|
||||||
|
|
||||||
nextTick(() => callback())
|
|
||||||
},
|
},
|
||||||
|
|
||||||
ls: (callback) => {
|
ls: (callback) => {
|
||||||
|
@ -423,6 +423,7 @@ describe('peer discovery', () => {
|
|||||||
randomWalk: {
|
randomWalk: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
queriesPerPeriod: 1,
|
queriesPerPeriod: 1,
|
||||||
|
delay: 100,
|
||||||
interval: 200, // start the query sooner
|
interval: 200, // start the query sooner
|
||||||
timeout: 3000
|
timeout: 3000
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user