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) {
|
||||
var locator, tip, watermark;
|
||||
var tip = this.chain.tip;
|
||||
var locator;
|
||||
|
||||
if (!this.syncing)
|
||||
return false;
|
||||
@ -619,9 +620,7 @@ Pool.prototype.sendSync = co(function* sendSync(peer) {
|
||||
peer.blockTime = util.ms();
|
||||
|
||||
if (this.headersFirst) {
|
||||
tip = this.chain.tip;
|
||||
watermark = this.headerTip;
|
||||
peer.sendGetHeaders([tip.hash], watermark.hash);
|
||||
peer.sendGetHeaders([tip.hash], this.headerTip.hash);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -629,7 +628,7 @@ Pool.prototype.sendSync = co(function* sendSync(peer) {
|
||||
locator = yield this.chain.getLocator();
|
||||
} catch (e) {
|
||||
this.emit('error', e);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
peer.sendGetBlocks(locator);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user