Skip to content

Commit ededb7c

Browse files
committed
splice: Fix txid watch for splice RBF
Remove a check that prevents txid watching on splice RBF attempts.
1 parent 8994332 commit ededb7c

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

lightningd/channel_control.c

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -753,15 +753,21 @@ static void handle_splice_sending_sigs(struct lightningd *ld,
753753
" splice_confirmed_signed txid %s",
754754
fmt_bitcoin_txid(tmpctx, &txid));
755755

756-
/* Signing a splice after it has confirmed is safe and can happen during
757-
* reestablish if one node is late seeing blocks */
758-
if (channel->state == CHANNELD_AWAITING_SPLICE)
759-
return;
756+
/* We can get here because of a splice RBF or because re-signing during
757+
* or because of a splice RBF. In the latter case, we will be adding
758+
* adding a harmless second txid watch on the inflight. */
759+
if (channel->state != CHANNELD_NORMAL
760+
&& channel->state != CHANNELD_AWAITING_SPLICE) {
761+
log_unusual(channel->log, "Setting state to"
762+
" CHANNELD_AWAITING_SPLICE but existing channel"
763+
" state is unexpected value %s",
764+
channel_state_str(channel->state));
765+
}
760766

761767
cc = splice_command_for_chan(ld, channel);
762768
/* If matching user command found, this was a user intiated splice */
763769
channel_set_state(channel,
764-
CHANNELD_NORMAL,
770+
channel->state,
765771
CHANNELD_AWAITING_SPLICE,
766772
cc ? REASON_USER : REASON_REMOTE,
767773
"Splice signatures sent");

0 commit comments

Comments
 (0)