mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-23 05:51:37 +00:00
fix: event emitter and interfaces types for discovery and routing (#934)
This commit is contained in:
@ -137,7 +137,12 @@ class Upgrader {
|
||||
* @returns {Promise<Connection>}
|
||||
*/
|
||||
async upgradeOutbound (maConn) {
|
||||
const remotePeerId = PeerId.createFromB58String(maConn.remoteAddr.getPeerId())
|
||||
const idStr = maConn.remoteAddr.getPeerId()
|
||||
if (!idStr) {
|
||||
throw errCode(new Error('outbound connection must have a peer id'), codes.ERR_INVALID_MULTIADDR)
|
||||
}
|
||||
|
||||
const remotePeerId = PeerId.createFromB58String(idStr)
|
||||
|
||||
let encryptedConn
|
||||
let remotePeer
|
||||
|
Reference in New Issue
Block a user