Skip to content

Commit 6b77c95

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 <rusty@rustcorp.com.au>
1 parent 6860cd9 commit 6b77c95

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
@@ -832,9 +832,11 @@ static const char *process_channel_update(const tal_t *ctx,
832832
u32 prev_timestamp
833833
= gossip_store_get_timestamp(gm->gs, chan->cupdate_off[dir]);
834834
if (prev_timestamp >= timestamp) {
835-
status_trace("Too-old update for %s",
836-
fmt_short_channel_id(tmpctx, scid));
837-
/* Too old, ignore */
835+
/* Don't spam the logs for duplicates! */
836+
if (timestamp < prev_timestamp)
837+
status_trace("Too-old update for %s",
838+
fmt_short_channel_id(tmpctx, scid));
839+
/* Too old / redundant, ignore */
838840
return NULL;
839841
}
840842
} else {

0 commit comments

Comments
 (0)