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:
committed by
Rusty Russell
parent
5f330b3cd6
commit
03d7d8f45a
@@ -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));
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user