Skip to content

Commit

Permalink
perf: do not depend on floodsub (#63)
Browse files Browse the repository at this point in the history
We only use the multicodec from floodsub, so just copy it here instead of bundling the whole of floodsub and it's dependencies.
  • Loading branch information
alanshaw committed Feb 3, 2020
1 parent 2ecbcb0 commit f825e07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"err-code": "^2.0.0",
"it-length-prefixed": "^3.0.0",
"it-pipe": "^1.0.1",
"libp2p-floodsub": "^0.20.0",
"libp2p-pubsub": "~0.4.1",
"p-map": "^3.0.0",
"peer-id": "~0.13.3",
Expand All @@ -55,6 +54,7 @@
"detect-node": "^2.0.4",
"dirty-chai": "^2.0.1",
"it-pair": "^1.0.0",
"libp2p-floodsub": "^0.20.0",
"lodash": "^4.17.15",
"mocha": "^6.2.1",
"p-times": "^2.1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/pubsub.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const lp = require('it-length-prefixed')
const pMap = require('p-map')

const { GossipSubID } = require('../src/constants')
const { multicodec: floodsubMulticodec } = require('libp2p-floodsub')
const floodsubMulticodec = '/floodsub/1.0.0'
const Pubsub = require('libp2p-pubsub')

const { utils } = require('libp2p-pubsub')
Expand Down

0 comments on commit f825e07

Please sign in to comment.