fix ValueReplication counter
Number of replicas was ValueReplication+1 before. Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
d7de86060c
commit
5bc4bbffdf
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue