From 031ecb3fe7a3dbad5ef3194e2a2db63537c93d01 Mon Sep 17 00:00:00 2001 From: David Dias Date: Fri, 31 Mar 2017 16:17:59 +0100 Subject: [PATCH] fix: correct method on peer-book --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index ece861179a..f120645281 100644 --- a/src/index.js +++ b/src/index.js @@ -211,7 +211,7 @@ class Node extends EventEmitter { } else if (multiaddr.isMultiaddr(peer)) { const peerIdB58Str = peer.getPeerId() try { - p = this.peerBook.getByB58String(peerIdB58Str) + p = this.peerBook.get(peerIdB58Str) } catch (err) { p = new PeerInfo(PeerId.createFromB58String(peerIdB58Str)) } @@ -219,7 +219,7 @@ class Node extends EventEmitter { } else if (PeerId.isPeerId(peer)) { const peerIdB58Str = peer.toB58String() try { - p = this.peerBook.getByB58String(peerIdB58Str) + p = this.peerBook.get(peerIdB58Str) } catch (err) { // TODO this is where PeerRouting comes into place throw new Error('No knowledge about: ' + peerIdB58Str)