fix handleGetAddr.

This commit is contained in:
Christopher Jeffrey 2016-05-04 16:37:02 -07:00
parent a4b1bc5a23
commit 5eed6081c7
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -190,9 +190,6 @@ Peer.prototype._init = function init() {
bcoin.debug(err.stack + '');
self.sendReject(null, 'malformed', 'error parsing message', 100);
self._error(err);
// Something is wrong here.
// Ignore this peer.
self.setMisbehavior(100);
});
this.challenge = utils.nonce();
@ -1280,9 +1277,12 @@ Peer.prototype._handleGetAddr = function handleGetAddr() {
ipv6: version === 6 ? ip : null,
port: peer.socket.remotePort || network.port
});
if (items.length === 1000)
break;
}
return this.write(this.framer.addr(peers));
return this.write(this.framer.addr(items));
};
Peer.prototype._handleInv = function handleInv(items) {