← Watch feed
splice: Clean up some spammy debug messages
What changed, and why it matters
This commit simply removes extra debug log messages from a sorting function used during splicing. No code behavior changes; it only reduces log noise.
Recommended action
No security action needed; routine log cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch deletes status_debug() calls inside commit_cmp() and handle_peer_commit_sig_batch() in channeld/channeld.c. The comparison logic, return values, and message handling remain identical. There are no functional changes.
Changed components
channeld/channeld.cInspect captured patch +3 / −20
diff --git a/channeld/channeld.c b/channeld/channeld.c
index 6489ba7c..3bf74119 100644
--- a/channeld/channeld.c
+++ b/channeld/channeld.c
@@ -2298,28 +2298,15 @@ static int commit_cmp(const void *a, const void *n, void *peer)
int commit_index_a = commit_index_from_msg(*(u8**)a, peer);
int commit_index_n = commit_index_from_msg(*(u8**)n, peer);
- status_debug("commit_cmp a: %p, n: %p result: %d & %d",
- *(u8**)a, *(u8**)n, commit_index_a, commit_index_n);
-
- if (commit_index_a == commit_index_n) {
- status_debug("commit_cmp: return 0");
+ if (commit_index_a == commit_index_n)
return 0;
- }
-
/* Unrecognized commits go on the end */
- if (commit_index_a == -1) {
- status_debug("commit_cmp: return 1");
+ if (commit_index_a == -1)
return 1;
- }
- if (commit_index_n == -1) {
- status_debug("commit_cmp: return -1");
+ if (commit_index_n == -1)
return -1;
- }
- status_debug("commit_cmp: return %d - %d = %d",
- commit_index_a, commit_index_n,
- commit_index_a - commit_index_n);
/* Otherwise we sort by commit_index */
return commit_index_a - commit_index_n;
}
@@ -2358,7 +2345,6 @@ static struct commitsig_info *handle_peer_commit_sig_batch(struct peer *peer,
msg_batch = tal_arr(tmpctx, const u8*, batch_size);
msg_batch[0] = msg;
- status_debug("msg_batch[0]: %p", msg_batch[0]);
/* Already received commitment signed once, so start at i = 1 */
for (u16 i = 1; i < batch_size; i++) {
@@ -2374,7 +2360,6 @@ static struct commitsig_info *handle_peer_commit_sig_batch(struct peer *peer,
"Expected splice related "
"WIRE_COMMITMENT_SIGNED but got %s",
peer_wire_name(type));
- status_debug("fromwire_commitment_signed(%p) splice index %d", sub_msg, (int)i);
if (!fromwire_commitment_signed(tmpctx, sub_msg,
&channel_id, &commit_sig.s,
&raw_sigs, &sub_cs_tlv))
@@ -2392,10 +2377,8 @@ static struct commitsig_info *handle_peer_commit_sig_batch(struct peer *peer,
tal_hex(sub_msg, sub_msg), i, batch_size);
msg_batch[i] = sub_msg;
- status_debug("msg_batch[%d]: %p", (int)i, msg_batch[i]);
}
- status_debug("Sorting the msg_batch of tal_count %d, batch_size: %d", (int)tal_count(msg_batch), (int)batch_size);
asort(msg_batch, tal_count(msg_batch), commit_cmp, peer);
return handle_peer_commit_sig(peer, msg_batch[0], commit_index,
Risk score
Our methodology →Why this scored 15/100
Human-validated context
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
No validated notes yet.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.