Skip to content

Commit 0719e0f

Browse files
committed
gossipd: don't spam the log on duplicate channel_update.
This message was too verbose (even for trace!) Signed-off-by: Rusty Russell <[email protected]>
1 parent 6413f5b commit 0719e0f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

gossipd/gossmap_manage.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -824,9 +824,11 @@ static const char *process_channel_update(const tal_t *ctx,
824824
u32 prev_timestamp
825825
= gossip_store_get_timestamp(gm->gs, chan->cupdate_off[dir]);
826826
if (prev_timestamp >= timestamp) {
827-
status_trace("Too-old update for %s",
828-
fmt_short_channel_id(tmpctx, scid));
829-
/* Too old, ignore */
827+
/* Don't spam the logs for duplicates! */
828+
if (timestamp < prev_timestamp)
829+
status_trace("Too-old update for %s",
830+
fmt_short_channel_id(tmpctx, scid));
831+
/* Too old / redundant, ignore */
830832
return NULL;
831833
}
832834
} else {

0 commit comments

Comments
 (0)