Updates for btcscript api changes.
This commit is contained in:
parent
9e55f32791
commit
2e3f91549c
1 changed files with 5 additions and 1 deletions
|
@ -216,10 +216,14 @@ func (w *BtcWallet) txToPairs(pairs map[string]uint64, fee uint64, minconf int)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate msgtx before returning the raw transaction.
|
// Validate msgtx before returning the raw transaction.
|
||||||
|
flags := btcscript.ScriptCanonicalSignatures
|
||||||
bip16 := time.Now().After(btcscript.Bip16Activation)
|
bip16 := time.Now().After(btcscript.Bip16Activation)
|
||||||
|
if bip16 {
|
||||||
|
flags |= btcscript.ScriptBip16
|
||||||
|
}
|
||||||
for i, txin := range msgtx.TxIn {
|
for i, txin := range msgtx.TxIn {
|
||||||
engine, err := btcscript.NewScript(txin.SignatureScript, inputs[i].Subscript, i,
|
engine, err := btcscript.NewScript(txin.SignatureScript, inputs[i].Subscript, i,
|
||||||
msgtx, bip16)
|
msgtx, flags)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, nil, fmt.Errorf("cannot create script engine: %s", err)
|
return nil, nil, nil, fmt.Errorf("cannot create script engine: %s", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue