mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 14:42:40 +01:00
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:
parent
b6241cde7a
commit
33a0af872a
1 changed files with 3 additions and 1 deletions
|
@ -1471,8 +1471,10 @@ bool routing_add_channel_update(struct routing_state *rstate,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure it's not spamming us (private channel
|
/* 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)
|
if (is_chan_public(chan)
|
||||||
|
&& !local_direction(rstate, chan, NULL)
|
||||||
&& !ratelimit(rstate,
|
&& !ratelimit(rstate,
|
||||||
&hc->tokens, hc->bcast.timestamp, timestamp)) {
|
&hc->tokens, hc->bcast.timestamp, timestamp)) {
|
||||||
status_peer_debug(source_peer,
|
status_peer_debug(source_peer,
|
||||||
|
|
Loading…
Add table
Reference in a new issue