lnd.xprv/discovery
Conner Fromknecht a56e7122d6
discovery/syncer: use rate limiter for gossip queries
This commit replaces the simplistic rate limiting
technique added in 557cb6e2, to use the
golang.org/x/time's rate limiter. This has the
benefit of performing traffic shaping to meet a
target maximum rate, and yet tolerate bursts. Bursts
are expected during initial sync, though should become
more rare afterwards. Performing traffic shaping with
this mechanism should improve the ability of the gossip
syncer to detect sustained bursts from the remote peer,
and penalize them appropriately.

This commit also modifies the default parameters to
accept bursts of 10 queries, with a target rate of 1
reply every 5 seconds.
2018-09-11 00:12:35 -07:00
..
ann_validation.go multi: sort import paths with gofmt 2018-08-02 18:20:49 -07:00
bootstrapper.go discovery: update autopilot.Node usage to match recent API changes 2018-08-29 15:45:39 -07:00
gossiper_test.go discovery: add new set of tests to ensure we validate w/ extra data 2018-09-04 20:52:44 -07:00
gossiper.go discovery/gossiper: remove go-errors pkg 2018-09-05 22:08:16 -07:00
log.go lnd: remove seelog logger 2017-06-25 14:19:56 +01:00
syncer_test.go discovery/syncer_test: add DOS delayed replies test 2018-09-05 22:08:16 -07:00
syncer.go discovery/syncer: use rate limiter for gossip queries 2018-09-11 00:12:35 -07:00
utils.go discovery: update utils to properly include opaque data in gossip msgs 2018-09-04 20:52:44 -07:00