chain: fix witness check.

This commit is contained in:
Christopher Jeffrey 2016-08-04 15:46:33 -07:00
parent dc0ee993e8
commit 8fe79fc7e7
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -401,7 +401,7 @@ Chain.prototype.verify = function verify(block, prev, callback) {
// Blocks that do not commit to
// witness data cannot contain it.
if (!commitmentHash && self.options.witness) {
if (!commitmentHash) {
if (block.hasWitness()) {
return callback(new VerifyError(block,
'invalid',