Skip to content

Commit 03d7d8f

Browse files
ddustinrustyrussell
authored andcommitted
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 5f330b3 commit 03d7d8f

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
@@ -2058,6 +2058,10 @@ void update_channel_from_inflight(struct lightningd *ld,
20582058
bitcoin_tx_with_psbt(channel, psbt_copy),
20592059
&inflight->last_sig);
20602060

2061+
/* If the remote side rotated their pubkey during splice, update now */
2062+
if (inflight->funding->splice_remote_funding)
2063+
channel->channel_info.remote_fundingkey = *inflight->funding->splice_remote_funding;
2064+
20612065
/* Update the reserve */
20622066
channel_update_reserve(channel,
20632067
&channel->channel_info.their_config,

0 commit comments

Comments
 (0)