config+server+networktest: make trickleDelay configurable

Add option to set trickleDelay for AuthenticatedGossiper in
command line, with default value of 300 milliseconds. Pass this
value to newServer, which uses it when creating a new instance of
AuthenticatedGossiper. Also set this value to 300 milliseconds when
creating nodes in integration tests.
This commit is contained in:
Laura Cressman
2017-09-13 19:33:46 -04:00
committed by Olaoluwa Osuntokun
parent 39d38da732
commit ed6ad22e85
4 changed files with 25 additions and 13 deletions

View File

@@ -295,7 +295,7 @@ func newServer(listenAddrs []string, chanDB *channeldb.DB, cc *chainControl,
Broadcast: s.BroadcastMessage,
SendToPeer: s.SendToPeer,
ProofMatureDelta: 0,
TrickleDelay: time.Millisecond * 300,
TrickleDelay: time.Millisecond * time.Duration(cfg.TrickleDelay),
RetransmitDelay: time.Minute * 30,
DB: chanDB,
AnnSigner: s.nodeSigner,