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 @@ -146,10 +146,10 @@ class PubsubBaseProtocol extends EventEmitter {
146
146
* @param {Object } props
147
147
* @param {string } props.protocol
148
148
* @param {DuplexStream } props.strean
149
- * @param {PeerId } props.remotePeer remote peer-id
149
+ * @param {Connection } props.connection connection
150
150
*/
151
- async _onIncomingStream ( { protocol, stream, remotePeer } ) {
152
- const peerInfo = await PeerInfo . create ( remotePeer )
151
+ async _onIncomingStream ( { protocol, stream, connection } ) {
152
+ const peerInfo = await PeerInfo . create ( connection . remotePeer )
153
153
peerInfo . protocols . add ( protocol )
154
154
155
155
const idB58Str = peerInfo . id . toB58String ( )
Original file line number Diff line number Diff line change @@ -180,7 +180,9 @@ describe('pubsub base protocol', () => {
180
180
await handlerB ( {
181
181
protocol,
182
182
stream : c1 . stream ,
183
- remotePeer : peerInfoA . id
183
+ connection : {
184
+ remotePeer : peerInfoA . id
185
+ }
184
186
} )
185
187
186
188
expect ( pubsubA . peers . size ) . to . be . eql ( 1 )
@@ -200,7 +202,9 @@ describe('pubsub base protocol', () => {
200
202
await handlerB ( {
201
203
protocol,
202
204
stream : c1 . stream ,
203
- remotePeer : peerInfoA . id
205
+ connection : {
206
+ remotePeer : peerInfoA . id
207
+ }
204
208
} )
205
209
206
210
// Notice peers of disconnect
You can’t perform that action at this time.
0 commit comments