Skip to content

Commit fa19774

Browse files
committed
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.
1 parent 7d10109 commit fa19774

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

channeld/channeld.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,8 @@ static void check_mutual_splice_locked(struct peer *peer)
491491
"Splice lock unable to update funding. %s",
492492
error);
493493

494+
peer->channel->funding_pubkey[REMOTE] = inflight->remote_funding;
495+
494496
status_debug("mutual splice_locked, channel updated to: %s",
495497
fmt_channel(tmpctx, peer->channel));
496498

lightningd/peer_control.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2053,6 +2053,10 @@ void update_channel_from_inflight(struct lightningd *ld,
20532053
bitcoin_tx_with_psbt(channel, psbt_copy),
20542054
&inflight->last_sig);
20552055

2056+
/* If the remote side rotated their pubkey during splice, update now */
2057+
if (inflight->funding->splice_remote_funding)
2058+
channel->channel_info.remote_fundingkey = *inflight->funding->splice_remote_funding;
2059+
20562060
/* Update the reserve */
20572061
channel_update_reserve(channel,
20582062
&channel->channel_info.their_config,

0 commit comments

Comments
 (0)