fix ValueReplication counter

Number of replicas was ValueReplication+1 before.

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
Csaba Kiraly 2023-09-03 13:54:19 +02:00
parent d7de86060c
commit 5bc4bbffdf
No known key found for this signature in database
GPG Key ID: 0FE274EE8C95166E
1 changed files with 1 additions and 1 deletions

View File

@ -874,7 +874,7 @@ proc addValue*(
# TODO: lookup is specified as not returning local, even if that is the closest. Is this OK?
if res.len == 0:
res.add(d.localNode)
for toNode in res[0 .. ValueReplication]:
for toNode in res[0 ..< ValueReplication]:
if toNode != d.localNode:
let reqId = RequestId.init(d.rng[])
d.sendRequest(toNode, AddValueMessage(cId: cId, value: value), reqId)