fix(rln): set a minimum epoch gap (#2555)

This commit is contained in:
Alvaro Revuelta 2024-03-27 11:36:14 +01:00 committed by GitHub
parent 47ad0fb001
commit b5e4795f55
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -452,14 +452,14 @@ proc mount(
nonceManager:
NonceManager.init(conf.rlnRelayUserMessageLimit, conf.rlnEpochSizeSec.float),
rlnEpochSizeSec: conf.rlnEpochSizeSec,
rlnMaxEpochGap: uint64(MaxClockGapSeconds / float64(conf.rlnEpochSizeSec)),
rlnMaxEpochGap: max(uint64(MaxClockGapSeconds / float64(conf.rlnEpochSizeSec)), 1),
onFatalErrorAction: conf.onFatalErrorAction,
)
else:
return WakuRLNRelay(
groupManager: groupManager,
rlnEpochSizeSec: conf.rlnEpochSizeSec,
rlnMaxEpochGap: uint64(MaxClockGapSeconds / float64(conf.rlnEpochSizeSec)),
rlnMaxEpochGap: max(uint64(MaxClockGapSeconds / float64(conf.rlnEpochSizeSec)), 1),
onFatalErrorAction: conf.onFatalErrorAction,
)