chain: minor fix for segnet3.

This commit is contained in:
Christopher Jeffrey 2016-07-26 02:20:36 -07:00
parent b7c280a84c
commit c0ac60e291
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -607,7 +607,6 @@ Chain.prototype.verify = function verify(block, prev, callback) {
Chain.prototype.getDeployments = function getDeployments(block, prev, ancestors, callback) { Chain.prototype.getDeployments = function getDeployments(block, prev, ancestors, callback) {
var self = this; var self = this;
var height = prev.height + 1;
var state = new DeploymentState(); var state = new DeploymentState();
// For some reason bitcoind has p2sh in the // For some reason bitcoind has p2sh in the
@ -668,7 +667,7 @@ Chain.prototype.getDeployments = function getDeployments(block, prev, ancestors,
} }
// Segregrated witness is now usable (bip141 - segnet3) // Segregrated witness is now usable (bip141 - segnet3)
if (this.network.oldWitness) { if (this.options.witness && this.network.oldWitness) {
if (block.version >= 5 && prev.isUpgraded(5, ancestors)) { if (block.version >= 5 && prev.isUpgraded(5, ancestors)) {
state.flags |= constants.flags.VERIFY_WITNESS; state.flags |= constants.flags.VERIFY_WITNESS;
if (!this.state.hasWitness()) if (!this.state.hasWitness())