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:
Jacob Heun 2019-05-07 13:45:59 +02:00 committed by GitHub
parent 71dcaafcac
commit 40978a1940
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 4 deletions

View File

@ -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",

View File

@ -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) => {

View File

@ -423,6 +423,7 @@ describe('peer discovery', () => {
randomWalk: {
enabled: true,
queriesPerPeriod: 1,
delay: 100,
interval: 200, // start the query sooner
timeout: 3000
}