chain: less polymorphism for getDeploymentState.
This commit is contained in:
parent
d1e37582d1
commit
cc7a7890db
@ -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);
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user