chain: minor segnet3 fix.

This commit is contained in:
Christopher Jeffrey 2016-07-26 12:05:18 -07:00
parent c0ac60e291
commit bccbef0aaa
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
2 changed files with 2 additions and 2 deletions

View File

@ -640,7 +640,7 @@ Chain.prototype.getDeployments = function getDeployments(block, prev, ancestors,
// Only allow version 5 blocks (bip141 - segnet3)
// once the majority of blocks are using it.
if (this.network.oldWitness) {
if (this.options.witness && this.network.oldWitness) {
if (block.version < 5 && prev.isOutdated(5, ancestors))
return callback(new VerifyError(block, 'obsolete', 'bad-version', 0));
}

View File

@ -356,7 +356,7 @@ Peer.prototype._onAck = function _onAck(err) {
// Let them know we support segwit (old
// segwit3 nodes require this instead
// of service bits).
if (this.network.oldWitness) {
if (this.pool.options.witness && this.network.oldWitness) {
if (this.version.version >= 70012)
this.write(this.framer.haveWitness());
}