test: use signDesc.HashType instead of SigHashAll in mockSigner
This commit is contained in:
parent
df17a680c4
commit
f5e324684f
4
mock.go
4
mock.go
@ -25,7 +25,7 @@ func (m *mockSigner) SignOutputRaw(tx *wire.MsgTx,
|
|||||||
privKey := m.key
|
privKey := m.key
|
||||||
|
|
||||||
sig, err := txscript.RawTxInWitnessSignature(tx, signDesc.SigHashes,
|
sig, err := txscript.RawTxInWitnessSignature(tx, signDesc.SigHashes,
|
||||||
signDesc.InputIndex, amt, witnessScript, txscript.SigHashAll,
|
signDesc.InputIndex, amt, witnessScript, signDesc.HashType,
|
||||||
privKey)
|
privKey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -38,7 +38,7 @@ func (m *mockSigner) ComputeInputScript(tx *wire.MsgTx,
|
|||||||
signDesc *lnwallet.SignDescriptor) (*lnwallet.InputScript, error) {
|
signDesc *lnwallet.SignDescriptor) (*lnwallet.InputScript, error) {
|
||||||
witnessScript, err := txscript.WitnessSignature(tx, signDesc.SigHashes,
|
witnessScript, err := txscript.WitnessSignature(tx, signDesc.SigHashes,
|
||||||
signDesc.InputIndex, signDesc.Output.Value,
|
signDesc.InputIndex, signDesc.Output.Value,
|
||||||
signDesc.Output.PkScript, txscript.SigHashAll, m.key, true)
|
signDesc.Output.PkScript, signDesc.HashType, m.key, true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user