chain: drop argument due to hardfork.

This commit is contained in:
Christopher Jeffrey 2016-10-21 19:42:31 -07:00
parent cb87c35caf
commit 89f175dd7a
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -345,7 +345,7 @@ Chain.prototype.verify = co(function* verify(block, prev) {
100);
}
state = yield this.getDeployments(block, prev, ancestors);
state = yield this.getDeployments(block, prev);
// Make sure the height contained in the coinbase is correct.
if (state.hasBIP34()) {
@ -433,12 +433,11 @@ Chain.prototype.verify = co(function* verify(block, prev) {
* Check all deployments on a chain, ranging from p2sh to segwit.
* @param {Block} block
* @param {ChainEntry} prev
* @param {ChainEntry[]} ancestors
* @returns {Promise}
* [{@link VerifyError}, {@link DeploymentState}].
*/
Chain.prototype.getDeployments = co(function* getDeployments(block, prev, ancestors) {
Chain.prototype.getDeployments = co(function* getDeployments(block, prev) {
var height = prev.height + 1;
var state = new DeploymentState();
var active;
@ -1965,14 +1964,11 @@ Chain.prototype.computeBlockVersion = co(function* computeBlockVersion(prev) {
Chain.prototype.getDeploymentState = co(function* getDeploymentState() {
var prev = yield this.tip.getPrevious();
var ancestors;
if (!prev)
return this.state;
ancestors = yield prev.getRetargetAncestors();
return yield this.getDeployments(this.tip, prev, ancestors);
return yield this.getDeployments(this.tip, prev);
});
/**