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 committed 2022-03-24 09:28:27 +01:00
1 parent bd5e29ec83
commit 1670000fd8
1 file changed
+2
+2
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)
}