sweep: always send signed output's pk script

Fixes #457.
The SignOutputRaw RPC is normally too lenient when it comes to fields
not being set, which is why this used to work previously. But with lnd
in remote signing mode, we need all the extra meta information available
on an input being signed for, so we actually need the pk script being
set.
Loop fully works with a remote signing lnd backend pair after applying
this fix.
This commit is contained in:
Oliver Gugger 2022-03-21 14:49:10 +01:00
parent a6350905d7
commit b7e5c0b449
No known key found for this signature in database
GPG key ID: 8E4256593F177720

View file

@ -61,7 +61,8 @@ func (s *Sweeper) CreateSweepTx(
signDesc := lndclient.SignDescriptor{
WitnessScript: htlc.Script(),
Output: &wire.TxOut{
Value: int64(amount),
Value: int64(amount),
PkScript: htlc.PkScript,
},
HashType: txscript.SigHashAll,
InputIndex: 0,