mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-08-06 03:43:30 +00:00
fix(rln): set maxEpochGap as maximum epoch gap (#1257)
This commit is contained in:
parent
586d549113
commit
f282621a1c
@ -815,7 +815,7 @@ proc validateMessage*(rlnPeer: WakuRLNRelay, msg: WakuMessage,
|
|||||||
debug "message epoch", msgEpoch = fromEpoch(msgEpoch)
|
debug "message epoch", msgEpoch = fromEpoch(msgEpoch)
|
||||||
|
|
||||||
# validate the epoch
|
# validate the epoch
|
||||||
if abs(gap) >= MaxEpochGap:
|
if abs(gap) > MaxEpochGap:
|
||||||
# message's epoch is too old or too ahead
|
# message's epoch is too old or too ahead
|
||||||
# accept messages whose epoch is within +-MaxEpochGap from the current epoch
|
# accept messages whose epoch is within +-MaxEpochGap from the current epoch
|
||||||
debug "invalid message: epoch gap exceeds a threshold", gap = gap,
|
debug "invalid message: epoch gap exceeds a threshold", gap = gap,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user