Skip to content

Commit b385150

Browse files
committed
fixup! splice: Resume splice_locked on reestablish
1 parent 89fff8f commit b385150

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

channeld/channeld.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5177,12 +5177,23 @@ static void peer_reconnect(struct peer *peer,
51775177
} else if (inflight->is_locked
51785178
&& bitcoin_txid_eq(remote_next_funding,
51795179
&inflight->outpoint.txid)) {
5180+
if (!bitcoin_txid_eq(&inflight->outpoint.txid,
5181+
&peer->splice_state->locked_txid))
5182+
peer_failed_err(peer->pps,
5183+
&peer->channel_id,
5184+
"Invalid splice was resumed %s,"
5185+
" should be %s",
5186+
fmt_bitcoin_txid(tmpctx,
5187+
&inflight->outpoint.txid),
5188+
fmt_bitcoin_txid(tmpctx,
5189+
&peer->splice_state->locked_txid));
51805190
status_info("Splice is not confirmed but locked on"
51815191
" chain -- resending splice_locked");
51825192
peer_write(peer->pps,
51835193
take(towire_splice_locked(NULL,
5184-
&peer->channel_id,
5185-
&inflight->outpoint.txid)));
5194+
&peer->channel_id,
5195+
&inflight->outpoint.txid)));
5196+
peer->splice_state->locked_ready[LOCAL] = true;
51865197
} else if (bitcoin_txid_eq(remote_next_funding,
51875198
&inflight->outpoint.txid)) {
51885199
/* Don't send sigs unless we have theirs */

0 commit comments

Comments
 (0)