fix: build: set PropagationDelaySecs correctly
This commit is contained in:
parent
27030aa1e8
commit
b4ec045bc0
@ -89,13 +89,16 @@ func init() {
|
|||||||
|
|
||||||
Devnet = true
|
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 {
|
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 {
|
if err != nil {
|
||||||
PropagationDelaySecs = uint64(10)
|
|
||||||
log.Warnw("Error setting PROPAGATION_DELAY_SECS, %v, proceed with default value %s", err,
|
log.Warnw("Error setting PROPAGATION_DELAY_SECS, %v, proceed with default value %s", err,
|
||||||
PropagationDelaySecs)
|
PropagationDelaySecs)
|
||||||
} else {
|
} else {
|
||||||
|
PropagationDelaySecs = pds
|
||||||
log.Warnw(" !!WARNING!! propagation delay is set to be %s second, "+
|
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)
|
"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 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
|
// BootstrapPeerThreshold is the minimum number peers we need to track for a sync worker to start
|
||||||
const BootstrapPeerThreshold = 4
|
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
|
//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.
|
//parent tipsets for blocking forming and mining.
|
||||||
if len(os.Getenv("PROPAGATION_DELAY_SECS")) != 0 {
|
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 {
|
if err != nil {
|
||||||
PropagationDelaySecs = uint64(10)
|
|
||||||
log.Warnw("Error setting PROPAGATION_DELAY_SECS, %v, proceed with default value %s", err,
|
log.Warnw("Error setting PROPAGATION_DELAY_SECS, %v, proceed with default value %s", err,
|
||||||
PropagationDelaySecs)
|
PropagationDelaySecs)
|
||||||
} else {
|
} else {
|
||||||
|
PropagationDelaySecs = pds
|
||||||
log.Warnw(" !!WARNING!! propagation delay is set to be %s second, "+
|
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)
|
"this value impacts your message republish interval and block forming - monitor with caution!!", PropagationDelaySecs)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user