diff --git a/PeerManager.js b/PeerManager.js index c6e2029..1e88bdf 100644 --- a/PeerManager.js +++ b/PeerManager.js @@ -111,6 +111,7 @@ PeerManager.prototype.addConnection = function(socketConn, peer) { }; PeerManager.prototype.handleVersion = function(e) { + e.peer.version = e.message.version; if (!e.conn.inbound) { // TODO: Advertise our address (if listening) } @@ -132,7 +133,7 @@ PeerManager.prototype.handleReady = function (e) { }); if(this.isConnected == false) { - this.emit('netConnected'); + this.emit('netConnected', e); this.isConnected = true; } };