mirror of
https://github.com/status-im/das-research.git
synced 2025-02-23 11:58:14 +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
|
||||
else:
|
||||
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.node.receiveSegment(rID, cID, self.ID)
|
||||
self.statsTxInSlot += 1
|
||||
@ -404,7 +404,7 @@ class Validator:
|
||||
cID = random.randrange(0, self.shape.blockSize)
|
||||
if self.block.getSegment(rID, cID) :
|
||||
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.node.receiveSegment(rID, cID, self.ID)
|
||||
self.statsTxInSlot += 1
|
||||
@ -416,7 +416,7 @@ class Validator:
|
||||
rID = random.randrange(0, self.shape.blockSize)
|
||||
if self.block.getSegment(rID, cID) :
|
||||
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.node.receiveSegment(rID, cID, self.ID)
|
||||
self.statsTxInSlot += 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user