allow push from non-neighbor

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
Csaba Kiraly 2023-02-23 20:58:55 +01:00
parent b33f829b0e
commit dfacd6bb18
No known key found for this signature in database
GPG Key ID: 0FE274EE8C95166E

View File

@ -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)):