diff --git a/rpcserver.go b/rpcserver.go index 49e54df..1322322 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -2834,9 +2834,9 @@ func SignRawTransaction(w *wallet.Wallet, chainSvr *chain.Client, icmd btcjson.C // Either it was already signed or we just signed it. // Find out if it is completely satisfied or still needs more. - engine, err := txscript.NewScript(input, msgTx, i, + vm, err := txscript.NewEngine(input, msgTx, i, txscript.StandardVerifyFlags) - if err != nil || engine.Execute() != nil { + if err != nil || vm.Execute() != nil { complete = false } } diff --git a/votingpool/withdrawal.go b/votingpool/withdrawal.go index 74e1bd0..e26a6c9 100644 --- a/votingpool/withdrawal.go +++ b/votingpool/withdrawal.go @@ -844,12 +844,12 @@ func signMultiSigUTXO(mgr *waddrmgr.Manager, tx *wire.MsgTx, idx int, pkScript [ // validateSigScripts executes the signature script of the tx input with the // given index, returning an error if it fails. func validateSigScript(msgtx *wire.MsgTx, idx int, pkScript []byte) error { - engine, err := txscript.NewScript(pkScript, msgtx, idx, + vm, err := txscript.NewEngine(pkScript, msgtx, idx, txscript.StandardVerifyFlags) if err != nil { return newError(ErrTxSigning, "cannot create script engine", err) } - if err = engine.Execute(); err != nil { + if err = vm.Execute(); err != nil { return newError(ErrTxSigning, "cannot validate tx signature", err) } return nil diff --git a/wallet/createtx.go b/wallet/createtx.go index 93b0ad0..2402566 100644 --- a/wallet/createtx.go +++ b/wallet/createtx.go @@ -404,12 +404,12 @@ func signMsgTx(msgtx *wire.MsgTx, prevOutputs []txstore.Credit, mgr *waddrmgr.Ma func validateMsgTx(msgtx *wire.MsgTx, prevOutputs []txstore.Credit) error { for i := range msgtx.TxIn { - engine, err := txscript.NewScript(prevOutputs[i].TxOut().PkScript, + vm, err := txscript.NewEngine(prevOutputs[i].TxOut().PkScript, msgtx, i, txscript.StandardVerifyFlags) if err != nil { return fmt.Errorf("cannot create script engine: %s", err) } - if err = engine.Execute(); err != nil { + if err = vm.Execute(); err != nil { return fmt.Errorf("cannot validate transaction: %s", err) } }