pool: minor.
This commit is contained in:
parent
6e13fe57c0
commit
d516035473
@ -587,7 +587,8 @@ Pool.prototype.stopSync = function stopSync() {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
Pool.prototype.sendSync = co(function* sendSync(peer) {
|
Pool.prototype.sendSync = co(function* sendSync(peer) {
|
||||||
var locator, tip, watermark;
|
var tip = this.chain.tip;
|
||||||
|
var locator;
|
||||||
|
|
||||||
if (!this.syncing)
|
if (!this.syncing)
|
||||||
return false;
|
return false;
|
||||||
@ -619,9 +620,7 @@ Pool.prototype.sendSync = co(function* sendSync(peer) {
|
|||||||
peer.blockTime = util.ms();
|
peer.blockTime = util.ms();
|
||||||
|
|
||||||
if (this.headersFirst) {
|
if (this.headersFirst) {
|
||||||
tip = this.chain.tip;
|
peer.sendGetHeaders([tip.hash], this.headerTip.hash);
|
||||||
watermark = this.headerTip;
|
|
||||||
peer.sendGetHeaders([tip.hash], watermark.hash);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -629,7 +628,7 @@ Pool.prototype.sendSync = co(function* sendSync(peer) {
|
|||||||
locator = yield this.chain.getLocator();
|
locator = yield this.chain.getLocator();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.emit('error', e);
|
this.emit('error', e);
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
peer.sendGetBlocks(locator);
|
peer.sendGetBlocks(locator);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user