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:
Dusty Daemon 2024-10-04 16:40:31 -04:00 committed by Rusty Russell
parent 5f330b3cd6
commit 03d7d8f45a
2 changed files with 6 additions and 0 deletions

View file

@ -491,6 +491,8 @@ static void check_mutual_splice_locked(struct peer *peer)
"Splice lock unable to update funding. %s",
error);
peer->channel->funding_pubkey[REMOTE] = inflight->remote_funding;
status_debug("mutual splice_locked, channel updated to: %s",
fmt_channel(tmpctx, peer->channel));

View file

@ -2058,6 +2058,10 @@ void update_channel_from_inflight(struct lightningd *ld,
bitcoin_tx_with_psbt(channel, psbt_copy),
&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 */
channel_update_reserve(channel,
&channel->channel_info.their_config,