Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimal update fix #6822

Merged
merged 2 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions gossipd/gossipd.c
Original file line number Diff line number Diff line change
Expand Up @@ -814,22 +814,6 @@ static void tell_master_local_cupdates(struct daemon *daemon)
}
}

/* Disables all channels connected to our node. */
static void gossip_disable_local_channels(struct daemon *daemon)
{
struct node *local_node = get_node(daemon->rstate, &daemon->id);
struct chan_map_iter i;
struct chan *c;

/* We don't have a local_node, so we don't have any channels yet
* either */
if (!local_node)
return;

for (c = first_chan(local_node, &i); c; c = next_chan(local_node, &i))
local_disable_chan(daemon, c, half_chan_idx(local_node, c));
}

struct peer *first_random_peer(struct daemon *daemon,
struct peer_node_id_map_iter *it)
{
Expand Down Expand Up @@ -897,9 +881,6 @@ static void gossip_init(struct daemon *daemon, const u8 *msg)
if (daemon->rstate->last_timestamp > timestamp)
daemon->rstate->last_timestamp = timestamp;

/* Now disable all local channels, they can't be connected yet. */
gossip_disable_local_channels(daemon);

/* If that announced channels, we can announce ourselves (options
* or addresses might have changed!) */
maybe_send_own_node_announce(daemon, true);
Expand Down
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
Loading