Update for txscript.Script -> txscript.Engine.
This commit is contained in:
parent
0d7b8af543
commit
b74a6f78a6
3 changed files with 6 additions and 6 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue