mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-23 15:00:34 +01:00
splice: Update funding pubkey on splice lock
Set the remote funding pubkey on both lightningd and channeld when mutual splice lock is achieved. This will be needed once rotating funding keys is enabled during splicing Changelog-None.
This commit is contained in:
parent
5f330b3cd6
commit
03d7d8f45a
2 changed files with 6 additions and 0 deletions
|
@ -491,6 +491,8 @@ static void check_mutual_splice_locked(struct peer *peer)
|
||||||
"Splice lock unable to update funding. %s",
|
"Splice lock unable to update funding. %s",
|
||||||
error);
|
error);
|
||||||
|
|
||||||
|
peer->channel->funding_pubkey[REMOTE] = inflight->remote_funding;
|
||||||
|
|
||||||
status_debug("mutual splice_locked, channel updated to: %s",
|
status_debug("mutual splice_locked, channel updated to: %s",
|
||||||
fmt_channel(tmpctx, peer->channel));
|
fmt_channel(tmpctx, peer->channel));
|
||||||
|
|
||||||
|
|
|
@ -2058,6 +2058,10 @@ void update_channel_from_inflight(struct lightningd *ld,
|
||||||
bitcoin_tx_with_psbt(channel, psbt_copy),
|
bitcoin_tx_with_psbt(channel, psbt_copy),
|
||||||
&inflight->last_sig);
|
&inflight->last_sig);
|
||||||
|
|
||||||
|
/* If the remote side rotated their pubkey during splice, update now */
|
||||||
|
if (inflight->funding->splice_remote_funding)
|
||||||
|
channel->channel_info.remote_fundingkey = *inflight->funding->splice_remote_funding;
|
||||||
|
|
||||||
/* Update the reserve */
|
/* Update the reserve */
|
||||||
channel_update_reserve(channel,
|
channel_update_reserve(channel,
|
||||||
&channel->channel_info.their_config,
|
&channel->channel_info.their_config,
|
||||||
|
|
Loading…
Add table
Reference in a new issue