pool: fix deadlock in block sync.

This commit is contained in:
Christopher Jeffrey 2016-11-02 18:33:53 -07:00
parent 5d3f15c2d8
commit 2bd3ac4618
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -2451,7 +2451,8 @@ Peer.prototype.resolveOrphan = co(function* resolveOrphan(tip, orphan) {
return; 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) { Peer.prototype.getHeaders = co(function* getHeaders(tip, stop) {
var locator = yield this.chain.getLocator(tip); 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) { Peer.prototype.getBlocks = co(function* getBlocks(tip, stop) {
var locator = yield this.chain.getLocator(tip); var locator = yield this.chain.getLocator(tip);
return this.sendGetBlocks(locator, stop); // Note: call and forget
this.sendGetBlocks(locator, stop);
}); });
/** /**