From 1d21dc48daf900cea73604b3c8133e6518e3de08 Mon Sep 17 00:00:00 2001 From: G <28568419+s1fr0@users.noreply.github.com> Date: Mon, 10 Oct 2022 21:50:16 +0200 Subject: [PATCH] fix(rln): set maxEpochGap as maximum epoch gap (#1257) --- waku/v2/protocol/waku_rln_relay/waku_rln_relay_utils.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/waku/v2/protocol/waku_rln_relay/waku_rln_relay_utils.nim b/waku/v2/protocol/waku_rln_relay/waku_rln_relay_utils.nim index 526bde8c6..8d371fe58 100644 --- a/waku/v2/protocol/waku_rln_relay/waku_rln_relay_utils.nim +++ b/waku/v2/protocol/waku_rln_relay/waku_rln_relay_utils.nim @@ -815,7 +815,7 @@ proc validateMessage*(rlnPeer: WakuRLNRelay, msg: WakuMessage, debug "message epoch", msgEpoch = fromEpoch(msgEpoch) # validate the epoch - if abs(gap) >= MaxEpochGap: + if abs(gap) > MaxEpochGap: # message's epoch is too old or too ahead # accept messages whose epoch is within +-MaxEpochGap from the current epoch debug "invalid message: epoch gap exceeds a threshold", gap = gap,