From 9b14cd99f1a78126f956f8f541dd1a33265ada3b Mon Sep 17 00:00:00 2001 From: David Hill Date: Fri, 1 Aug 2014 13:50:31 -0400 Subject: [PATCH] Enable ScriptStrictMultiSig when creating or signing txs. ok @jrick --- createtx.go | 2 +- rpcserver.go | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/createtx.go b/createtx.go index 6e88dba..7e272b3 100644 --- a/createtx.go +++ b/createtx.go @@ -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 diff --git a/rpcserver.go b/rpcserver.go index e136f0e..0a1effb 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -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 }