fix handleGetAddr.
This commit is contained in:
parent
a4b1bc5a23
commit
5eed6081c7
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user