mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 11:59:16 +01:00
signpsbt: don't crash if HSM doesn't like your psbt, just return err
Changelog-Changed: JSON-RPC: `signpsbt` no longer crashes if it doesn't like what your PSBT is
This commit is contained in:
parent
4984014578
commit
4e7f89f211
1 changed files with 3 additions and 2 deletions
|
@ -789,8 +789,9 @@ static struct command_result *json_signpsbt(struct command *cmd,
|
|||
msg = wire_sync_read(cmd, cmd->ld->hsm_fd);
|
||||
|
||||
if (!fromwire_hsmd_sign_withdrawal_reply(cmd, msg, &signed_psbt))
|
||||
fatal("HSM gave bad sign_withdrawal_reply %s",
|
||||
tal_hex(tmpctx, msg));
|
||||
return command_fail(cmd, JSONRPC2_INVALID_PARAMS,
|
||||
"HSM gave bad sign_withdrawal_reply %s",
|
||||
tal_hex(tmpctx, msg));
|
||||
|
||||
response = json_stream_success(cmd);
|
||||
json_add_psbt(response, "signed_psbt", signed_psbt);
|
||||
|
|
Loading…
Add table
Reference in a new issue