rpcwallet: fix np2wkh inputs in remote signing

There is a one byte difference between the sigScript and the
witnessScript in case of a np2wkh input. The remote signer actually
needs the witness script and not the sig script to produce a valid
signature.
This commit is contained in:
Oliver Gugger
2023-02-07 22:15:12 +01:00
parent c6c52b8eb3
commit 8bc16b4fb2

View File

@@ -617,7 +617,7 @@ func (r *RPCKeyRing) ComputeInputScript(tx *wire.MsgTx,
// Let's give the TX to the remote instance now, so it can sign the
// input.
sig, err := r.remoteSign(tx, signDesc, sigScript)
sig, err := r.remoteSign(tx, signDesc, witnessProgram)
if err != nil {
return nil, fmt.Errorf("error signing with remote instance: %v",
err)