walletrpc: add debug log statement for invalid PSBT

To help debug remote signing issues, it's helpful to get the raw PSBT
that failed to be parsed. This is necessary since serializing an invalid
PSBT is allowed and the checks only fail when trying to de-serialize
such an invalid packet.
This commit is contained in:
Oliver Gugger 2022-03-16 15:11:10 +01:00
parent bd5e29ec83
commit 1670000fd8
No known key found for this signature in database
GPG Key ID: 8E4256593F177720

View File

@ -1224,6 +1224,8 @@ func (w *WalletKit) SignPsbt(_ context.Context, req *SignPsbtRequest) (
bytes.NewReader(req.FundedPsbt), false,
)
if err != nil {
log.Debugf("Error parsing PSBT: %v, raw input: %x", err,
req.FundedPsbt)
return nil, fmt.Errorf("error parsing PSBT: %v", err)
}