Updates for txscript.NewScript API change.
This commit is contained in:
parent
ab8a155841
commit
0d7b8af543
3 changed files with 7 additions and 9 deletions
|
@ -2834,8 +2834,8 @@ 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(txIn.SignatureScript, input,
|
||||
i, msgTx, txscript.StandardVerifyFlags)
|
||||
engine, err := txscript.NewScript(input, msgTx, i,
|
||||
txscript.StandardVerifyFlags)
|
||||
if err != nil || engine.Execute() != nil {
|
||||
complete = false
|
||||
}
|
||||
|
|
|
@ -844,9 +844,8 @@ 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 {
|
||||
txIn := msgtx.TxIn[idx]
|
||||
engine, err := txscript.NewScript(
|
||||
txIn.SignatureScript, pkScript, idx, msgtx, txscript.StandardVerifyFlags)
|
||||
engine, err := txscript.NewScript(pkScript, msgtx, idx,
|
||||
txscript.StandardVerifyFlags)
|
||||
if err != nil {
|
||||
return newError(ErrTxSigning, "cannot create script engine", err)
|
||||
}
|
||||
|
|
|
@ -403,10 +403,9 @@ func signMsgTx(msgtx *wire.MsgTx, prevOutputs []txstore.Credit, mgr *waddrmgr.Ma
|
|||
}
|
||||
|
||||
func validateMsgTx(msgtx *wire.MsgTx, prevOutputs []txstore.Credit) error {
|
||||
for i, txin := range msgtx.TxIn {
|
||||
engine, err := txscript.NewScript(
|
||||
txin.SignatureScript, prevOutputs[i].TxOut().PkScript,
|
||||
i, msgtx, txscript.StandardVerifyFlags)
|
||||
for i := range msgtx.TxIn {
|
||||
engine, err := txscript.NewScript(prevOutputs[i].TxOut().PkScript,
|
||||
msgtx, i, txscript.StandardVerifyFlags)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot create script engine: %s", err)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue