pool: account for header download time before invoking stall behavior.
This commit is contained in:
parent
5511526d98
commit
2a69b7ab7a
@ -197,7 +197,7 @@ Peer.RESPONSE_TIMEOUT = 30000;
|
||||
* @default
|
||||
*/
|
||||
|
||||
Peer.BLOCK_TIMEOUT = 60000;
|
||||
Peer.BLOCK_TIMEOUT = 120000;
|
||||
|
||||
/**
|
||||
* Max number of requested items.
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user