diff --git a/build/params_calibnet.go b/build/params_calibnet.go index cdf8dc6e95a..faedd3ea864 100644 --- a/build/params_calibnet.go +++ b/build/params_calibnet.go @@ -89,13 +89,16 @@ func init() { Devnet = true + // NOTE: DO NOT change this unless you REALLY know what you're doing. This is not consensus critical, however, + //set this value too high may impacts your block submission; set this value too low may cause you miss + //parent tipsets for blocking forming and mining. if len(os.Getenv("PROPAGATION_DELAY_SECS")) != 0 { - PropagationDelaySecs, err := strconv.ParseUint(os.Getenv("PROPAGATION_DELAY_SECS"), 10, 64) + pds, err := strconv.ParseUint(os.Getenv("PROPAGATION_DELAY_SECS"), 10, 64) if err != nil { - PropagationDelaySecs = uint64(10) log.Warnw("Error setting PROPAGATION_DELAY_SECS, %v, proceed with default value %s", err, PropagationDelaySecs) } else { + PropagationDelaySecs = pds log.Warnw(" !!WARNING!! propagation delay is set to be %s second, "+ "this value impacts your message republish interval and block forming - monitor with caution!!", PropagationDelaySecs) } @@ -107,7 +110,7 @@ func init() { const BlockDelaySecs = uint64(builtin2.EpochDurationSeconds) -const PropagationDelaySecs = uint64(10) +var PropagationDelaySecs = uint64(10) // BootstrapPeerThreshold is the minimum number peers we need to track for a sync worker to start const BootstrapPeerThreshold = 4 diff --git a/build/params_mainnet.go b/build/params_mainnet.go index 45ceb89bdbb..c3864ffd2d5 100644 --- a/build/params_mainnet.go +++ b/build/params_mainnet.go @@ -103,12 +103,12 @@ func init() { //set this value too high may impacts your block submission; set this value too low may cause you miss //parent tipsets for blocking forming and mining. if len(os.Getenv("PROPAGATION_DELAY_SECS")) != 0 { - PropagationDelaySecs, err := strconv.ParseUint(os.Getenv("PROPAGATION_DELAY_SECS"), 10, 64) + pds, err := strconv.ParseUint(os.Getenv("PROPAGATION_DELAY_SECS"), 10, 64) if err != nil { - PropagationDelaySecs = uint64(10) log.Warnw("Error setting PROPAGATION_DELAY_SECS, %v, proceed with default value %s", err, PropagationDelaySecs) } else { + PropagationDelaySecs = pds log.Warnw(" !!WARNING!! propagation delay is set to be %s second, "+ "this value impacts your message republish interval and block forming - monitor with caution!!", PropagationDelaySecs) }