mirror of
https://github.com/logos-storage/das-research.git
synced 2026-01-07 15:43:08 +00:00
fix: avoid looking into the future
Checking neigh.receiving is cheating in the current model. If the timeslot is small, information can't propagate that fast. Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
af72e58d08
commit
655f3a6642
@ -344,7 +344,7 @@ class Validator:
|
|||||||
i = cID
|
i = cID
|
||||||
else:
|
else:
|
||||||
i = rID
|
i = rID
|
||||||
if not neigh.sent[i] and not neigh.receiving[i] :
|
if not neigh.sent[i] and not neigh.received[i] :
|
||||||
neigh.sent[i] = 1
|
neigh.sent[i] = 1
|
||||||
neigh.node.receiveSegment(rID, cID, self.ID)
|
neigh.node.receiveSegment(rID, cID, self.ID)
|
||||||
self.statsTxInSlot += 1
|
self.statsTxInSlot += 1
|
||||||
@ -404,7 +404,7 @@ class Validator:
|
|||||||
cID = random.randrange(0, self.shape.blockSize)
|
cID = random.randrange(0, self.shape.blockSize)
|
||||||
if self.block.getSegment(rID, cID) :
|
if self.block.getSegment(rID, cID) :
|
||||||
neigh = random.choice(list(self.rowNeighbors[rID].values()))
|
neigh = random.choice(list(self.rowNeighbors[rID].values()))
|
||||||
if not neigh.sent[cID] and not neigh.receiving[cID] :
|
if not neigh.sent[cID] and not neigh.received[cID] :
|
||||||
neigh.sent[cID] = 1
|
neigh.sent[cID] = 1
|
||||||
neigh.node.receiveSegment(rID, cID, self.ID)
|
neigh.node.receiveSegment(rID, cID, self.ID)
|
||||||
self.statsTxInSlot += 1
|
self.statsTxInSlot += 1
|
||||||
@ -416,7 +416,7 @@ class Validator:
|
|||||||
rID = random.randrange(0, self.shape.blockSize)
|
rID = random.randrange(0, self.shape.blockSize)
|
||||||
if self.block.getSegment(rID, cID) :
|
if self.block.getSegment(rID, cID) :
|
||||||
neigh = random.choice(list(self.columnNeighbors[cID].values()))
|
neigh = random.choice(list(self.columnNeighbors[cID].values()))
|
||||||
if not neigh.sent[rID] and not neigh.receiving[rID] :
|
if not neigh.sent[rID] and not neigh.received[rID] :
|
||||||
neigh.sent[rID] = 1
|
neigh.sent[rID] = 1
|
||||||
neigh.node.receiveSegment(rID, cID, self.ID)
|
neigh.node.receiveSegment(rID, cID, self.ID)
|
||||||
self.statsTxInSlot += 1
|
self.statsTxInSlot += 1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user