BIP 147: enforce NULLDUMMY w/ segwit verification

This commit implements the flag activation portion of BIP 0147. The
verification behavior triggered by the NULLDUMMY script verification
flag has been present within btcd for some time, however it wasn’t
activated by default.

With this commit, once segwit has activated, the ScriptStrictMultiSig
will also be activated within the Script VM. Additionally, the
ScriptStrictMultiSig is now a standard script verification flag which
is used unconditionally within the mempool.
This commit is contained in:
Olaoluwa Osuntokun 2016-10-18 18:03:51 -07:00 committed by Dave Collins
parent aaf187427e
commit 9054ef8354
2 changed files with 3 additions and 0 deletions

View file

@ -1196,6 +1196,8 @@ func (b *BlockChain) checkConnectBlock(node *blockNode, block *btcutil.Block, vi
}
}
scriptFlags |= txscript.ScriptStrictMultiSig
// Now that the inexpensive checks are done and have passed, verify the
// transactions are actually allowed to spend the coins by running the
// expensive ECDSA signature check scripts. Doing this last helps

View file

@ -38,6 +38,7 @@ const (
ScriptVerifyCheckLockTimeVerify |
ScriptVerifyCheckSequenceVerify |
ScriptVerifyLowS |
ScriptStrictMultiSig |
ScriptVerifyWitness |
ScriptVerifyDiscourageUpgradeableWitnessProgram
)