From cc7a7890db34cb24144b1b03f39c4bc19306840f Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Mon, 28 Nov 2016 16:08:35 -0800 Subject: [PATCH] chain: less polymorphism for getDeploymentState. --- lib/blockchain/chain.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/blockchain/chain.js b/lib/blockchain/chain.js index 1cef54bc..6ab9a9d8 100644 --- a/lib/blockchain/chain.js +++ b/lib/blockchain/chain.js @@ -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); }); /**