Skip to content

Commit

Permalink
gossipd: never regard our own updates as spam.
Browse files Browse the repository at this point in the history
If we ever re-enabled a channel too fast, if we considered it spam it
wouldn't propagate.   For the moment, consider our own updates to never
be spam.

Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Oct 30, 2023
1 parent b6241cd commit 33a0af8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gossipd/routing.c
Original file line number Diff line number Diff line change
Expand Up @@ -1471,8 +1471,10 @@ bool routing_add_channel_update(struct routing_state *rstate,
}

/* Make sure it's not spamming us (private channel
* updates are never considered spam) */
* updates are never considered spam, nor is anything
* we send ourselves!) */
if (is_chan_public(chan)
&& !local_direction(rstate, chan, NULL)
&& !ratelimit(rstate,
&hc->tokens, hc->bcast.timestamp, timestamp)) {
status_peer_debug(source_peer,
Expand Down

0 comments on commit 33a0af8

Please sign in to comment.