File tree 2 files changed +9
-5
lines changed
2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,12 @@ class PubsubBaseProtocol extends EventEmitter {
50
50
this . peerId = this . libp2p . peerInfo . id
51
51
}
52
52
53
+ /**
54
+ * If message signing should be required for incoming messages
55
+ * @type {boolean }
56
+ */
57
+ this . strictSigning = options . strictSigning
58
+
53
59
/**
54
60
* Map of topics to which peers are subscribed to
55
61
*
@@ -374,6 +380,9 @@ class PubsubBaseProtocol extends EventEmitter {
374
380
if ( err ) return callback ( err )
375
381
callback ( null , valid )
376
382
} )
383
+ } else {
384
+ // The message is valid
385
+ nextTick ( callback , null , true )
377
386
}
378
387
}
379
388
}
Original file line number Diff line number Diff line change @@ -103,11 +103,6 @@ describe('pubsub base protocol', () => {
103
103
psA . _buildMessage ( message , ( err , signedMessage ) => {
104
104
expect ( err ) . to . not . exist ( )
105
105
106
- // const bytesToSign = Buffer.concat([
107
- // SignPrefix,
108
- // Message.encode(normalizeOutRpcMessage(message))
109
- // ])
110
-
111
106
psA . validate ( signedMessage , ( err , verified ) => {
112
107
expect ( verified ) . to . eql ( true )
113
108
done ( err )
You can’t perform that action at this time.
0 commit comments