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

@@ -61,6 +61,10 @@ var (
// seed nodes to log files.
logOutput = flag.Bool("logoutput", false,
"log output from node n to file outputn.log")
// trickleDelay is the amount of time in milliseconds between each
// release of announcements by AuthenticatedGossiper to the network.
trickleDelay = 300
)
// generateListeningPorts returns two strings representing ports to listen on
@@ -187,6 +191,7 @@ func (l *lightningNode) genArgs() []string {
args = append(args, fmt.Sprintf("--configfile=%v", l.cfg.DataDir))
args = append(args, fmt.Sprintf("--adminmacaroonpath=%v", l.cfg.AdminMacPath))
args = append(args, fmt.Sprintf("--readonlymacaroonpath=%v", l.cfg.ReadMacPath))
args = append(args, fmt.Sprintf("--trickledelay=%v", trickleDelay))
if l.extraArgs != nil {
args = append(args, l.extraArgs...)