Skip to content

Commit 1adbd70

Browse files
cdeckerrustyrussell
authored andcommitted
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
1 parent f0c5ea2 commit 1adbd70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lightningd/watch.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,8 @@ static bool txw_fire(struct txwatch *txw,
208208

209209
if (txw->depth == -1) {
210210
log_debug(txw->topo->log,
211-
"Got first depth change ->%u for %s",
212-
txw->depth,
211+
"Got first depth change 0->%u for %s",
212+
depth,
213213
fmt_bitcoin_txid(tmpctx, &txw->txid));
214214
} else {
215215
/* zero depth signals a reorganization */

0 commit comments

Comments
 (0)