be explicit about republish interval, check against timecache duration
This commit is contained in:
parent
0fcf8838cc
commit
2e75d9c80a
@ -45,7 +45,7 @@ var rbfDenomBig = types.NewInt(RbfDenom)
|
|||||||
|
|
||||||
const RbfDenom = 256
|
const RbfDenom = 256
|
||||||
|
|
||||||
var RepublishInterval = pubsub.TimeCacheDuration + time.Duration(5*build.BlockDelaySecs+build.PropagationDelaySecs)*time.Second
|
var RepublishInterval = time.Duration(10*build.BlockDelaySecs+build.PropagationDelaySecs) * time.Second
|
||||||
|
|
||||||
var minimumBaseFee = types.NewInt(uint64(build.MinimumBaseFee))
|
var minimumBaseFee = types.NewInt(uint64(build.MinimumBaseFee))
|
||||||
var baseFeeLowerBoundFactor = types.NewInt(10)
|
var baseFeeLowerBoundFactor = types.NewInt(10)
|
||||||
@ -81,6 +81,14 @@ const (
|
|||||||
localUpdates = "update"
|
localUpdates = "update"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
// if the republish interval is too short compared to the pubsub timecache, adjust it
|
||||||
|
minInterval := pubsub.TimeCacheDuration + time.Duration(build.PropagationDelaySecs)
|
||||||
|
if RepublishInterval < minInterval {
|
||||||
|
RepublishInterval = minInterval
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
type MessagePool struct {
|
type MessagePool struct {
|
||||||
lk sync.Mutex
|
lk sync.Mutex
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user