diff --git a/lib/bcoin/bip150.js b/lib/bcoin/bip150.js index c1a53067..f4a248b4 100644 --- a/lib/bcoin/bip150.js +++ b/lib/bcoin/bip150.js @@ -162,17 +162,17 @@ BIP150.prototype.propose = function propose(payload) { BIP150.prototype.toChallenge = function toChallenge(writer) { var p = new bcoin.writer(writer); - var msg; + var hash; assert(this.outbound, 'Cannot challenge an inbound connection.'); assert(this.peerIdentity, 'Cannot challenge without a peer identity.'); - msg = this.hash(this.output.sid, 'i', this.peerIdentity); + hash = this.hash(this.output.sid, 'i', this.peerIdentity); assert(!this.challengeSent, 'Cannot initiate challenge twice.'); this.challengeSent = true; - p.writeBytes(msg); + p.writeBytes(hash); if (!writer) p = p.render(); diff --git a/lib/bcoin/peer.js b/lib/bcoin/peer.js index 61525812..fface8b5 100644 --- a/lib/bcoin/peer.js +++ b/lib/bcoin/peer.js @@ -350,7 +350,8 @@ Peer.prototype._onHandshake = function _onHandshake() { assert(this.bip150.completed); if (this.bip150.auth) { this.logger.info('BIP150 handshake complete (%s).', this.hostname); - this.logger.info('Peer is authed (%s).', this.hostname); + this.logger.info('Peer is authed (%s): %s.', + this.hostname, this.bip150.getAddress()); } }