Enable ScriptStrictMultiSig when creating or signing txs.

ok @jrick
This commit is contained in:
David Hill 2014-08-01 13:50:31 -04:00
parent e7263e48dc
commit 9b14cd99f1
2 changed files with 4 additions and 3 deletions

View file

@ -347,7 +347,7 @@ func (w *Wallet) addInputsToTx(msgtx *btcwire.MsgTx, outputs []txstore.Credit) e
}
func validateMsgTx(msgtx *btcwire.MsgTx, inputs []txstore.Credit) error {
flags := btcscript.ScriptCanonicalSignatures
flags := btcscript.ScriptCanonicalSignatures | btcscript.ScriptStrictMultiSig
bip16 := time.Now().After(btcscript.Bip16Activation)
if bip16 {
flags |= btcscript.ScriptBip16

View file

@ -2699,9 +2699,10 @@ func SignRawTransaction(w *Wallet, chainSvr *chain.Client, icmd btcjson.Cmd) (in
// Either it was already signed or we just signed it.
// Find out if it is completely satisfied or still needs more.
flags := btcscript.ScriptBip16 | btcscript.ScriptCanonicalSignatures |
btcscript.ScriptStrictMultiSig
engine, err := btcscript.NewScript(txIn.SignatureScript, input,
i, msgTx, btcscript.ScriptBip16|
btcscript.ScriptCanonicalSignatures)
i, msgTx, flags)
if err != nil || engine.Execute() != nil {
complete = false
}