Fix the verification of rows and columns assigned

This commit is contained in:
Leonardo Bautista-Gomez 2024-03-07 12:01:07 +01:00
parent a2d6fd2deb
commit 22de053aee
1 changed files with 10 additions and 4 deletions

View File

@ -28,9 +28,15 @@ class Observer:
self.columns[c] += 1
for i in range(self.config.nbRows):
self.logger.debug("Row/Column %d have %d and %d validators assigned." % (i, self.rows[i], self.columns[i]), extra=self.format)
if self.rows[i] == 0 or self.columns[i] == 0:
self.logger.warning("There is a row/column that has not been assigned", extra=self.format)
self.logger.debug("Row %d has %d validators assigned." % (i, self.rows[i]), extra=self.format)
if self.rows[i] == 0:
self.logger.warning("There is a row that has not been assigned", extra=self.format)
for i in range(self.config.nbCols):
self.logger.debug("Column %d has %d validators assigned." % (i, self.columns[i]), extra=self.format)
if self.columns[i] == 0:
self.logger.warning("There is a column that has not been assigned", extra=self.format)
def checkBroadcasted(self):
"""It checks how many broadcasted samples are still missing in the network."""
@ -100,4 +106,4 @@ class Observer:
"RxDup": {"mean": meanOrNan(RxDup), "max": maxOrNan(RxDup)},
}
return trafficStats
return trafficStats