fix: build: set PropagationDelaySecs correctly
This commit is contained in:
parent
7a2bc47486
commit
906d8bffdf
@ -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
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user