pool: account for header download time before invoking stall behavior.

This commit is contained in:
Christopher Jeffrey 2017-02-28 09:12:57 -08:00
parent 5511526d98
commit 2a69b7ab7a
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
2 changed files with 5 additions and 1 deletions

View File

@ -197,7 +197,7 @@ Peer.RESPONSE_TIMEOUT = 30000;
* @default
*/
Peer.BLOCK_TIMEOUT = 60000;
Peer.BLOCK_TIMEOUT = 120000;
/**
* Max number of requested items.

View File

@ -1883,6 +1883,10 @@ Pool.prototype._handleHeaders = co(function* handleHeaders(peer, packet) {
headers.length,
peer.hostname());
// If we received a valid header
// chain, consider this a "block".
peer.blockTime = util.ms();
// Request the blocks we just added.
if (checkpoint) {
this.headerChain.shift();