chain: less polymorphism for getDeploymentState.

This commit is contained in:
Christopher Jeffrey 2016-11-28 16:08:35 -08:00
parent d1e37582d1
commit cc7a7890db
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -2093,10 +2093,12 @@ Chain.prototype.computeBlockVersion = co(function* computeBlockVersion(prev) {
Chain.prototype.getDeploymentState = co(function* getDeploymentState() {
var prev = yield this.tip.getPrevious();
if (!prev)
if (!prev) {
assert(this.tip.isGenesis());
return this.state;
}
return yield this.getDeployments(this.tip, prev);
return yield this.getDeployments(this.tip.toHeaders(), prev);
});
/**