mirror of
https://github.com/logos-storage/logos-storage-nim-dht.git
synced 2026-01-07 16:03:09 +00:00
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?
|
# TODO: lookup is specified as not returning local, even if that is the closest. Is this OK?
|
||||||
if res.len == 0:
|
if res.len == 0:
|
||||||
res.add(d.localNode)
|
res.add(d.localNode)
|
||||||
for toNode in res[0 .. ValueReplication]:
|
for toNode in res[0 ..< ValueReplication]:
|
||||||
if toNode != d.localNode:
|
if toNode != d.localNode:
|
||||||
let reqId = RequestId.init(d.rng[])
|
let reqId = RequestId.init(d.rng[])
|
||||||
d.sendRequest(toNode, AddValueMessage(cId: cId, value: value), reqId)
|
d.sendRequest(toNode, AddValueMessage(cId: cId, value: value), reqId)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user