From 1adbd70678381525faad1cf2e1af7cfe2ebef514 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Thu, 5 Dec 2024 18:07:08 +0100 Subject: [PATCH] logs: Correct an sign mismatch printing the depth change We are checking if `txw->depth` is `-1` and then print it, when we clearly want `depth` instead. Changelog-Fixed logs: When printing depths some unsigned numbers could overflow --- lightningd/watch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lightningd/watch.c b/lightningd/watch.c index 8ad4cd95c..faba763ec 100644 --- a/lightningd/watch.c +++ b/lightningd/watch.c @@ -208,8 +208,8 @@ static bool txw_fire(struct txwatch *txw, if (txw->depth == -1) { log_debug(txw->topo->log, - "Got first depth change ->%u for %s", - txw->depth, + "Got first depth change 0->%u for %s", + depth, fmt_bitcoin_txid(tmpctx, &txw->txid)); } else { /* zero depth signals a reorganization */