Skip to content

Commit 79bf18b

Browse files
committed
Splice: Rotating funding pubkey fix
Interop testing with Eclair revealed an issue with remote funding key rotation. This searches for the funding output using the rotated remote funding pubkey instead of the furrent funding pubkey. Also update the variable name to be more clear which this represents. Changelog-Changed: Interop fixes for compatability with Eclair
1 parent b6c1ffa commit 79bf18b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

channeld/channeld.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3306,7 +3306,7 @@ static void resume_splice_negotiation(struct peer *peer,
33063306
struct bitcoin_tx *bitcoin_tx;
33073307
u32 splice_funding_index;
33083308
const u8 *msg, *sigmsg;
3309-
u32 chan_output_index;
3309+
u32 new_output_index;
33103310
struct pubkey *their_pubkey;
33113311
struct bitcoin_tx *final_tx;
33123312
struct bitcoin_txid final_txid;
@@ -3337,8 +3337,8 @@ static void resume_splice_negotiation(struct peer *peer,
33373337
&peer->channel->funding_pubkey[LOCAL],
33383338
&peer->channel->funding_pubkey[REMOTE]);
33393339

3340-
find_channel_output(peer, current_psbt, &chan_output_index,
3341-
&peer->channel->funding_pubkey[REMOTE]);
3340+
find_channel_output(peer, current_psbt, &new_output_index,
3341+
&inflight->remote_funding);
33423342

33433343
splice_funding_index = find_channel_funding_input(current_psbt,
33443344
&peer->channel->funding);
@@ -3622,7 +3622,7 @@ static void resume_splice_negotiation(struct peer *peer,
36223622

36233623
final_tx = bitcoin_tx_with_psbt(tmpctx, current_psbt);
36243624
msg = towire_channeld_splice_confirmed_signed(tmpctx, final_tx,
3625-
chan_output_index);
3625+
new_output_index);
36263626
wire_sync_write(MASTER_FD, take(msg));
36273627
}
36283628
}

0 commit comments

Comments
 (0)