wallet: fix compile errors under WIP segwit branch

This commit is contained in:
Olaoluwa Osuntokun 2016-04-12 21:27:32 -07:00
parent 8e723ea454
commit a2ff118b25
2 changed files with 3 additions and 3 deletions

View file

@ -40,7 +40,7 @@ func makeInputSource(eligible []wtxmgr.Credit) txauthor.InputSource {
for currentTotal < target && len(eligible) != 0 { for currentTotal < target && len(eligible) != 0 {
nextCredit := &eligible[0] nextCredit := &eligible[0]
eligible = eligible[1:] eligible = eligible[1:]
nextInput := wire.NewTxIn(&nextCredit.OutPoint, nil) nextInput := wire.NewTxIn(&nextCredit.OutPoint, nil, nil)
currentTotal += nextCredit.Amount currentTotal += nextCredit.Amount
currentInputs = append(currentInputs, nextInput) currentInputs = append(currentInputs, nextInput)
currentScripts = append(currentScripts, nextCredit.PkScript) currentScripts = append(currentScripts, nextCredit.PkScript)
@ -224,7 +224,7 @@ func (w *Wallet) findEligibleOutputs(account uint32, minconf int32, bs *waddrmgr
func validateMsgTx(tx *wire.MsgTx, prevScripts [][]byte) error { func validateMsgTx(tx *wire.MsgTx, prevScripts [][]byte) error {
for i, prevScript := range prevScripts { for i, prevScript := range prevScripts {
vm, err := txscript.NewEngine(prevScript, tx, i, vm, err := txscript.NewEngine(prevScript, tx, i,
txscript.StandardVerifyFlags, nil) txscript.StandardVerifyFlags, nil, nil, 0)
if err != nil { if err != nil {
return fmt.Errorf("cannot create script engine: %s", err) return fmt.Errorf("cannot create script engine: %s", err)
} }

View file

@ -2024,7 +2024,7 @@ func (w *Wallet) SignTransaction(tx *wire.MsgTx, hashType txscript.SigHashType,
// Either it was already signed or we just signed it. // Either it was already signed or we just signed it.
// Find out if it is completely satisfied or still needs more. // Find out if it is completely satisfied or still needs more.
vm, err := txscript.NewEngine(prevOutScript, tx, i, vm, err := txscript.NewEngine(prevOutScript, tx, i,
txscript.StandardVerifyFlags, nil) txscript.StandardVerifyFlags, nil, nil, 0)
if err == nil { if err == nil {
err = vm.Execute() err = vm.Execute()
} }