From 22de053aee57ee243b2b3ce23f0d3d95b3581027 Mon Sep 17 00:00:00 2001 From: Leonardo Bautista-Gomez Date: Thu, 7 Mar 2024 12:01:07 +0100 Subject: [PATCH] Fix the verification of rows and columns assigned --- DAS/observer.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/DAS/observer.py b/DAS/observer.py index 3173efa..7abc606 100644 --- a/DAS/observer.py +++ b/DAS/observer.py @@ -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 \ No newline at end of file + return trafficStats