Skip to content

Commit 3acbaf1

Browse files
ddustinsangbida
authored andcommitted
fixup! splice: Handle CHANNEL_READY during splice resume
1 parent 60cd23e commit 3acbaf1

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

channeld/channeld.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3032,8 +3032,6 @@ static const u8 *peer_expect_msg_four(const tal_t *ctx,
30323032

30333033
msg = peer_read(ctx, peer->pps);
30343034
type = fromwire_peektype(msg);
3035-
if (type == WIRE_ERROR)
3036-
abort();
30373035
if (type != expect_type
30383036
&& type != second_allowed_type
30393037
&& type != third_allowed_type
@@ -3116,9 +3114,14 @@ static struct commitsig *interactive_send_commitments(struct peer *peer,
31163114
WIRE_TX_ABORT,
31173115
allowed_premature_msg);
31183116

3117+
/* If the message is a type that we allow to receive
3118+
* prematurely: process this, then come back and get another
3119+
* message */
31193120
if (allowed_premature_msg
31203121
&& fromwire_peektype(msg) == allowed_premature_msg) {
3122+
/* Process the pre-allowed message */
31213123
peer_in(peer, msg);
3124+
/* Now get a new message */
31223125
msg = peer_expect_msg_four(tmpctx, peer,
31233126
WIRE_COMMITMENT_SIGNED,
31243127
WIRE_TX_SIGNATURES,
@@ -6037,7 +6040,7 @@ static void peer_reconnect(struct peer *peer,
60376040
if (retransmit_revoke_and_ack && peer->last_was_revoke)
60386041
resend_revoke(peer);
60396042

6040-
/* BOLT-??? #2
6043+
/* BOLT-splice #2
60416044
* 1. type: 5 (`my_current_funding_locked`)
60426045
* 2. data:
60436046
* * [`sha256`:`my_current_funding_locked_txid`]

0 commit comments

Comments
 (0)