Revert "discovery: add new option to toggle gossip rate limiting"

This reverts commit 13a2598ded.
This commit is contained in:
Wilmer Paulino 2021-02-10 14:38:09 -08:00
parent d4fa430ca6
commit bfc8523873
No known key found for this signature in database
GPG Key ID: 6DF57B9F9514972F
3 changed files with 2 additions and 10 deletions

View File

@ -233,11 +233,6 @@ type Config struct {
// graph on connect.
IgnoreHistoricalFilters bool
// GossipUpdateThrottle if true, then the gossiper will throttle
// gossip updates to once per RebroadcastInterval for any keep-alive
// updates, and once per block for other types of updates.
GossipUpdateThrottle bool
// PinnedSyncers is a set of peers that will always transition to
// ActiveSync upon connection. These peers will never transition to
// PassiveSync.
@ -1937,9 +1932,8 @@ func (d *AuthenticatedGossiper) processNetworkAnnouncement(
// If we have a previous version of the edge being updated,
// we'll want to rate limit its updates to prevent spam
// throughout the network if we're currently throttling such
// updates.
if d.cfg.GossipUpdateThrottle && nMsg.isRemote && edgeToUpdate != nil {
// throughout the network.
if nMsg.isRemote && edgeToUpdate != nil {
// If it's a keep-alive update, we'll only propagate one
// if it's been a day since the previous. This follows
// our own heuristic of sending keep-alive updates after

View File

@ -3938,7 +3938,6 @@ func TestRateLimitChannelUpdates(t *testing.T) {
}
defer cleanup()
ctx.gossiper.cfg.RebroadcastInterval = time.Hour
ctx.gossiper.cfg.GossipUpdateThrottle = true
// The graph should start empty.
require.Empty(t, ctx.router.infos)

View File

@ -819,7 +819,6 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
MinimumBatchSize: 10,
SubBatchDelay: time.Second * 5,
IgnoreHistoricalFilters: cfg.IgnoreHistoricalGossipFilters,
GossipUpdateThrottle: !cfg.ProtocolOptions.NoGossipThrottle(),
PinnedSyncers: cfg.Gossip.PinnedSyncers,
},
s.identityECDH.PubKey(),