gossipd: never regard our own updates as spam.

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 <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2023-10-30 10:03:40 +10:30
parent b6241cde7a
commit 33a0af872a

View file

@ -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,