From 2bd3ac461850c3ab8494ed6023ec0bb9c5cd4006 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 2 Nov 2016 18:33:53 -0700 Subject: [PATCH] pool: fix deadlock in block sync. --- lib/net/peer.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/net/peer.js b/lib/net/peer.js index 5c88b349..10f35161 100644 --- a/lib/net/peer.js +++ b/lib/net/peer.js @@ -2451,7 +2451,8 @@ Peer.prototype.resolveOrphan = co(function* resolveOrphan(tip, orphan) { return; } - yield this.sendGetBlocks(locator, root); + // Note: call and forget + this.sendGetBlocks(locator, root); }); /** @@ -2463,7 +2464,8 @@ Peer.prototype.resolveOrphan = co(function* resolveOrphan(tip, orphan) { Peer.prototype.getHeaders = co(function* getHeaders(tip, stop) { var locator = yield this.chain.getLocator(tip); - return this.sendGetHeaders(locator, stop); + // Note: call and forget + this.sendGetHeaders(locator, stop); }); /** @@ -2475,7 +2477,8 @@ Peer.prototype.getHeaders = co(function* getHeaders(tip, stop) { Peer.prototype.getBlocks = co(function* getBlocks(tip, stop) { var locator = yield this.chain.getLocator(tip); - return this.sendGetBlocks(locator, stop); + // Note: call and forget + this.sendGetBlocks(locator, stop); }); /**