lightningd: fix format specifier for bitcoin_tx_weight in splice log.
What changed, and why it matters
This is a one-character code change fixing a compiler warning. It changes a log message format from %lu to %zu so the code compiles cleanly on platforms where a particular data type size differs. It does not change program behavior or fix any security issue.
No security action needed. Treat as a normal build-fix commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit corrects a printf-style format specifier in a debug log call in lightningd/channel_control.c. bitcoin_tx_weight() returns size_t, and the previous %lu specifier could trigger a -Wformat error (treated as fatal under -Werror) when size_t is not unsigned long. The change is purely cosmetic/build-related and has no functional or security impact.
Changed components
lightningd/channel_control.cInspect captured patch +1 / −1
diff --git a/lightningd/channel_control.c b/lightningd/channel_control.c
index 9735e72a..55b8a381 100644
--- a/lightningd/channel_control.c
+++ b/lightningd/channel_control.c
@@ -621,7 +621,7 @@ static void send_splice_tx(struct channel *channel,
u8* tx_bytes = linearize_tx(tmpctx, tx);
log_debug(channel->log,
- "Broadcasting splice tx %s for channel %s. Final weight %lu",
+ "Broadcasting splice tx %s for channel %s. Final weight %zu",
tal_hex(tmpctx, tx_bytes),
fmt_channel_id(tmpctx, &channel->cid),
bitcoin_tx_weight(tx));
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.