Skip to content

Commit

Permalink
chore: update deps (#155)
Browse files Browse the repository at this point in the history
There's a new release of the `peer-id` module that uses the `CID` class from the
`multiformats` module instead of from `cids`.

This PR upgrades to the new version, along with all the supporting ecosystem modules

BREAKING CHANGE: the new `peer-id` module uses the new `CID` class and not the old one
  • Loading branch information
achingbrain committed Jul 9, 2021
1 parent 3c3c465 commit df69a90
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
"denque": "^1.5.0",
"err-code": "^3.0.1",
"it-pipe": "^1.1.0",
"libp2p-interfaces": "^0.11.0",
"peer-id": "^0.14.8",
"libp2p-interfaces": "^1.0.1",
"peer-id": "^0.15.0",
"protobufjs": "^6.11.2",
"time-cache": "^0.3.0",
"uint8arrays": "^2.1.5"
Expand All @@ -70,13 +70,14 @@
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"it-pair": "^1.0.0",
"libp2p": "^0.31.6",
"libp2p-floodsub": "^0.25.1",
"libp2p": "next",
"libp2p-floodsub": "^0.27.0",
"libp2p-interfaces-compliance-tests": "^1.0.1",
"libp2p-mplex": "^0.10.3",
"libp2p-noise": "^2.0.0",
"libp2p-websockets": "^0.15.5",
"libp2p-noise": "^4.0.0",
"libp2p-websockets": "^0.16.1",
"lodash": "^4.17.15",
"multiaddr": "^9.0.0",
"multiaddr": "^10.0.0",
"os": "^0.1.1",
"p-retry": "^4.2.0",
"p-times": "^2.1.0",
Expand Down
2 changes: 1 addition & 1 deletion test/compliance.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-env mocha */
'use strict'

const tests = require('libp2p-interfaces/src/pubsub/tests')
const tests = require('libp2p-interfaces-compliance-tests/src/pubsub')

const Gossipsub = require('../src')
const { createPeers } = require('./utils/create-peer')
Expand Down
10 changes: 5 additions & 5 deletions ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,10 @@ class Gossipsub extends Pubsub {
* @param {String} idB58Str
* @param {PeerStreams} peerStreams
* @param {RPC} rpc
* @returns {boolean}
* @returns {Promise<boolean>}
*/
_processRpc (id: string, peerStreams: PeerStreams, rpc: RPC): boolean {
if (super._processRpc(id, peerStreams, rpc)) {
async _processRpc (id: string, peerStreams: PeerStreams, rpc: RPC): Promise<boolean> {
if (await super._processRpc(id, peerStreams, rpc)) {
if (rpc.control) {
this._processRpcControlMessage(id, rpc.control)
}
Expand Down Expand Up @@ -403,7 +403,7 @@ class Gossipsub extends Pubsub {
* @returns {Promise<void>}
*/
async _processRpcMessage (msg: InMessage): Promise<void> {
const msgID = this.getMsgId(msg)
const msgID = await this.getMsgId(msg)
const msgIdStr = messageIdToString(msgID)

// Ignore if we've already seen the message
Expand Down Expand Up @@ -1017,7 +1017,7 @@ class Gossipsub extends Pubsub {
this.gossipTracer.deliverMessage(msg)
}

const msgID = this.getMsgId(msg)
const msgID = await this.getMsgId(msg)
const msgIdStr = messageIdToString(msgID)
// put in seen cache
this.seenCache.put(msgIdStr)
Expand Down

0 comments on commit df69a90

Please sign in to comment.