mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-05-06 23:09:25 +00:00
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:
parent
820ccc6e10
commit
ff98d85313
@ -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]
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user