Skip to content

Commit

Permalink
feat: sign pubsub messages (#362)
Browse files Browse the repository at this point in the history
* fix: forward pubsub publish callback to floodsub

chore: update floodsub version

* test: add random walk delay to config

* chore: update floodsub
  • Loading branch information
jacobheun authored May 7, 2019
1 parent 71dcaaf commit 40978a1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"err-code": "^1.1.2",
"fsm-event": "^2.1.0",
"libp2p-connection-manager": "~0.1.0",
"libp2p-floodsub": "~0.15.8",
"libp2p-floodsub": "~0.16.0",
"libp2p-ping": "~0.8.5",
"libp2p-switch": "~0.42.9",
"libp2p-websockets": "~0.12.2",
Expand Down
4 changes: 1 addition & 3 deletions src/pubsub.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ module.exports = (node) => {
return nextTick(callback, errCode(new Error('data must be a Buffer'), 'ERR_DATA_IS_NOT_A_BUFFER'))
}

floodSub.publish(topic, data)

nextTick(() => callback())
floodSub.publish(topic, data, callback)
},

ls: (callback) => {
Expand Down
1 change: 1 addition & 0 deletions test/peer-discovery.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ describe('peer discovery', () => {
randomWalk: {
enabled: true,
queriesPerPeriod: 1,
delay: 100,
interval: 200, // start the query sooner
timeout: 3000
}
Expand Down

0 comments on commit 40978a1

Please sign in to comment.