Skip to content

Commit 9f57025

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 fec74bc commit 9f57025

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
@@ -490,6 +490,8 @@ static void check_mutual_splice_locked(struct peer *peer)
490490
"Splice lock unable to update funding. %s",
491491
error);
492492

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

lightningd/peer_control.c

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

2045+
/* If the remote side rotated their pubkey during splice, update now */
2046+
if (inflight->funding->splice_remote_funding)
2047+
channel->channel_info.remote_fundingkey = *inflight->funding->splice_remote_funding;
2048+
20452049
/* Update the reserve */
20462050
channel_update_reserve(channel,
20472051
&channel->channel_info.their_config,

0 commit comments

Comments
 (0)