mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-23 06:55:13 +01:00
splice: Extract remote sig from psbt if needed
On certain well timed restarts we lose their siganture from memory and don’t receive it from them. In these cases we can extract it from the PSBT directly.
This commit is contained in:
parent
73ad8eaa31
commit
d60e9f342b
1 changed files with 10 additions and 3 deletions
|
@ -3420,10 +3420,17 @@ static void resume_splice_negotiation(struct peer *peer,
|
|||
&& have_they_signed_inflight(peer, inflight)) {
|
||||
|
||||
if (!their_sig) {
|
||||
status_failed(STATUS_FAIL_INTERNAL_ERROR,
|
||||
"Should not arrive here w/o their_sig");
|
||||
return;
|
||||
status_debug("Splice: Extracting their_sig from psbt");
|
||||
if (!psbt_input_get_signature(tmpctx, current_psbt,
|
||||
splice_funding_index,
|
||||
&peer->channel->funding_pubkey[REMOTE],
|
||||
&their_sig))
|
||||
status_failed(STATUS_FAIL_INTERNAL_ERROR,
|
||||
"Should not arrive here w/o"
|
||||
" their_sig");
|
||||
}
|
||||
assert(their_sig);
|
||||
|
||||
psbt_input_set_witscript(current_psbt,
|
||||
splice_funding_index,
|
||||
wit_script);
|
||||
|
|
Loading…
Add table
Reference in a new issue