Skip to content

Commit fe7ba77

Browse files
ddustinrustyrussell
authored andcommitted
splice: Add more verbose reestablish debug logging
1 parent 475d5f8 commit fe7ba77

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

channeld/channeld.c

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,8 +1150,10 @@ static u8 *send_commit_part(const tal_t *ctx,
11501150
if (feature_negotiated(peer->our_features,
11511151
peer->their_features,
11521152
OPT_EXPERIMENTAL_SPLICE)) {
1153-
status_debug("send_commit_part(splice: %d, remote_splice: %d)",
1154-
(int)splice_amnt, (int)remote_splice_amnt);
1153+
status_debug("send_commit_part(splice: %d, remote_splice: %d,"
1154+
" index: %"PRIu64")",
1155+
(int)splice_amnt, (int)remote_splice_amnt,
1156+
remote_index);
11551157

11561158
cs_tlv->splice_info = tal(cs_tlv, struct channel_id);
11571159
derive_channel_id(cs_tlv->splice_info, funding);
@@ -1839,8 +1841,9 @@ static struct commitsig_info *handle_peer_commit_sig(struct peer *peer,
18391841
const struct commitsig **commitsigs;
18401842
int remote_anchor_outnum;
18411843

1842-
status_debug("handle_peer_commit_sig(splice: %d, remote_splice: %d)",
1843-
(int)splice_amnt, (int)remote_splice_amnt);
1844+
status_debug("handle_peer_commit_sig(splice: %d, remote_splice: %d,"
1845+
" index: %"PRIu64")",
1846+
(int)splice_amnt, (int)remote_splice_amnt, local_index);
18441847

18451848
struct tlv_commitment_signed_tlvs *cs_tlv
18461849
= tlv_commitment_signed_tlvs_new(tmpctx);
@@ -2703,8 +2706,11 @@ static struct commitsig *interactive_send_commitments(struct peer *peer,
27032706
if (do_i_sign_first(peer, psbt, our_role, inflight->force_sign_first)
27042707
&& send_commitments) {
27052708

2706-
status_debug("Splice %s: we commit first",
2707-
our_role == TX_INITIATOR ? "initiator" : "accepter");
2709+
status_debug("Splice %s: we commit first;"
2710+
" next_index_local:%"PRIu64";"
2711+
" next_index_remote:%"PRIu64,
2712+
our_role == TX_INITIATOR ? "initiator" : "accepter",
2713+
next_index_local, next_index_remote);
27082714

27092715
peer_write(peer->pps, send_commit_part(tmpctx,
27102716
peer,
@@ -2731,6 +2737,12 @@ static struct commitsig *interactive_send_commitments(struct peer *peer,
27312737
if (msg_received)
27322738
*msg_received = msg;
27332739

2740+
status_debug("Splice %s: we recv commit;"
2741+
" next_index_local:%"PRIu64";"
2742+
" next_index_remote:%"PRIu64,
2743+
our_role == TX_INITIATOR ? "initiator" : "accepter",
2744+
next_index_local, next_index_remote);
2745+
27342746
/* Funding counts as 0th commit so we do inflight_index + 1 */
27352747
if (fromwire_peektype(msg) == WIRE_COMMITMENT_SIGNED) {
27362748
get_per_commitment_point(next_index_local - 1,
@@ -2750,8 +2762,11 @@ static struct commitsig *interactive_send_commitments(struct peer *peer,
27502762
if (!do_i_sign_first(peer, psbt, our_role, inflight->force_sign_first)
27512763
&& send_commitments) {
27522764

2753-
status_debug("Splice %s: we commit second",
2754-
our_role == TX_INITIATOR ? "initiator" : "accepter");
2765+
status_debug("Splice %s: we commit second;"
2766+
" next_index_local:%"PRIu64";"
2767+
" next_index_remote:%"PRIu64,
2768+
our_role == TX_INITIATOR ? "initiator" : "accepter",
2769+
next_index_local, next_index_remote);
27552770

27562771
peer_write(peer->pps, send_commit_part(tmpctx,
27572772
peer,

0 commit comments

Comments
 (0)