fix: relay validator registration and sync filter (#3823)

* reuse stored validator in relay
* fix skip check in store sync
* increase sync tolerance in test (matches similar test)
This commit is contained in:
Fabiana Cecin 2026-04-23 16:02:34 -03:00 committed by GitHub
parent 820ccc6e10
commit ff98d85313
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -372,7 +372,7 @@ suite "Waku Sync: reconciliation":
const
msgCount = 400_000
diffCount = 100_000
tol = 1000
tol = 10_000
var diffMsgHashes: HashSet[WakuMessageHash]
var missingIdx: HashSet[int]

View File

@ -618,7 +618,7 @@ proc subscribe*(w: WakuRelay, pubsubTopic: PubsubTopic, handler: WakuRelayHandle
# Otherwise this might lead to unintended behaviour.
if not w.topicValidator.hasKey(pubSubTopic):
let newValidator = w.generateOrderedValidator()
procCall GossipSub(w).addValidator(pubSubTopic, w.generateOrderedValidator())
procCall GossipSub(w).addValidator(pubSubTopic, newValidator)
w.topicValidator[pubSubTopic] = newValidator
# set this topic parameters for scoring

View File

@ -145,7 +145,7 @@ proc preProcessPayload(
# convert to skip range before processing
for i in 0 ..< payload.ranges.len:
let rangeType = payload.ranges[i][1]
if rangeType != RangeType.Skip:
if rangeType == RangeType.Skip:
continue
let upperBound = payload.ranges[i][0].b.time