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
This commit is contained in:
Christian Decker 2024-12-05 18:07:08 +01:00 committed by Rusty Russell
parent f0c5ea2e1e
commit 1adbd70678

View File

@ -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 */