peer: timeout bip150 and bip151 properly.

This commit is contained in:
Christopher Jeffrey 2017-01-16 11:43:45 -08:00
parent f2d092f23c
commit 120ceef984
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -1440,6 +1440,7 @@ Peer.prototype.onPacket = co(function* onPacket(packet) {
throw new Error('Destroyed peer sent a packet.');
if (this.bip151
&& this.bip151.job
&& !this.bip151.completed
&& packet.type !== packetTypes.ENCINIT
&& packet.type !== packetTypes.ENCACK) {
@ -1447,6 +1448,7 @@ Peer.prototype.onPacket = co(function* onPacket(packet) {
}
if (this.bip150
&& this.bip150.job
&& !this.bip150.completed
&& packet.type !== packetTypes.AUTHCHALLENGE
&& packet.type !== packetTypes.AUTHREPLY