From dfacd6bb18b72cddaa5577329f8a45aeaca7d428 Mon Sep 17 00:00:00 2001 From: Csaba Kiraly Date: Thu, 23 Feb 2023 20:58:55 +0100 Subject: [PATCH] allow push from non-neighbor Signed-off-by: Csaba Kiraly --- DAS/validator.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/DAS/validator.py b/DAS/validator.py index dc19ed7..5dfd99c 100644 --- a/DAS/validator.py +++ b/DAS/validator.py @@ -200,7 +200,10 @@ class Validator: """It receives the given column if it has been assigned to it.""" if id in self.columnIDs: # register receive so that we are not sending back - self.columnNeighbors[id][src].receiving |= column + if src in self.columnNeighbors[id]: # (check if peer or initial publish) + self.columnNeighbors[id][src].receiving |= column + else: + pass #check for duplicates old = self.receivedBlock.getColumn(id) for i in range(len(column)): @@ -220,7 +223,10 @@ class Validator: """It receives the given row if it has been assigned to it.""" if id in self.rowIDs: # register receive so that we are not sending back - self.rowNeighbors[id][src].receiving |= row + if src in self.rowNeighbors[id]: # (check if peer or initial publish) + self.rowNeighbors[id][src].receiving |= row + else: + pass #check for duplicates old = self.receivedBlock.getRow(id) for i in range(len(row)):