Skip to content

Commit 40978a1

Browse files
authored
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
1 parent 71dcaaf commit 40978a1

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"err-code": "^1.1.2",
4444
"fsm-event": "^2.1.0",
4545
"libp2p-connection-manager": "~0.1.0",
46-
"libp2p-floodsub": "~0.15.8",
46+
"libp2p-floodsub": "~0.16.0",
4747
"libp2p-ping": "~0.8.5",
4848
"libp2p-switch": "~0.42.9",
4949
"libp2p-websockets": "~0.12.2",

src/pubsub.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@ module.exports = (node) => {
6363
return nextTick(callback, errCode(new Error('data must be a Buffer'), 'ERR_DATA_IS_NOT_A_BUFFER'))
6464
}
6565

66-
floodSub.publish(topic, data)
67-
68-
nextTick(() => callback())
66+
floodSub.publish(topic, data, callback)
6967
},
7068

7169
ls: (callback) => {

test/peer-discovery.node.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ describe('peer discovery', () => {
423423
randomWalk: {
424424
enabled: true,
425425
queriesPerPeriod: 1,
426+
delay: 100,
426427
interval: 200, // start the query sooner
427428
timeout: 3000
428429
}

0 commit comments

Comments
 (0)