Skip to content

Commit

Permalink
BIP 147: enforce NULLDUMMY w/ segwit verification
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Roasbeef authored and davecgh committed Aug 14, 2017
1 parent aaf1874 commit 9054ef8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions blockchain/validate.go
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions txscript/standard.go
Expand Up @@ -38,6 +38,7 @@ const (
ScriptVerifyCheckLockTimeVerify |
ScriptVerifyCheckSequenceVerify |
ScriptVerifyLowS |
ScriptStrictMultiSig |
ScriptVerifyWitness |
ScriptVerifyDiscourageUpgradeableWitnessProgram
)
Expand Down

0 comments on commit 9054ef8

Please sign in to comment.