use WitnessSignatureScript
This commit is contained in:
parent
05590279b2
commit
cb3b20ad6c
@ -201,10 +201,20 @@ func (s *SPVCon) SendCoins(adr btcutil.Address, sendAmt int64) error {
|
|||||||
|
|
||||||
// This is where witness based sighash types need to happen
|
// This is where witness based sighash types need to happen
|
||||||
// sign into stash
|
// sign into stash
|
||||||
sigStash[i], err = txscript.SignatureScript(
|
if ins[i].IsWit {
|
||||||
tx, i, txin.SignatureScript, txscript.SigHashAll, priv, true)
|
sigStash[i], err = txscript.WitnessSignatureScript(
|
||||||
if err != nil {
|
tx, i, ins[i].Value, txin.SignatureScript,
|
||||||
return err
|
txscript.SigHashAll, priv, true)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
sigStash[i], err = txscript.SignatureScript(
|
||||||
|
tx, i, txin.SignatureScript,
|
||||||
|
txscript.SigHashAll, priv, true)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// swap sigs into sigScripts in txins
|
// swap sigs into sigScripts in txins
|
||||||
|
Loading…
Reference in New Issue
Block a user