mirror of
https://github.com/logos-storage/das-research.git
synced 2026-01-07 15:43:08 +00:00
remove unused golden data
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
954d40e758
commit
952d191ccd
@ -13,18 +13,17 @@ class Observer:
|
|||||||
self.block = []
|
self.block = []
|
||||||
self.rows = []
|
self.rows = []
|
||||||
self.columns = []
|
self.columns = []
|
||||||
self.goldenData = []
|
|
||||||
self.broadcasted = []
|
self.broadcasted = []
|
||||||
|
|
||||||
|
|
||||||
def reset(self):
|
def reset(self):
|
||||||
"""It resets all the gathered data to zeros."""
|
"""It resets all the gathered data to zeros."""
|
||||||
self.block = [0] * self.config.blockSize * self.config.blockSize
|
self.block = [0] * self.config.blockSize * self.config.blockSize
|
||||||
self.goldenData = [0] * self.config.blockSize * self.config.blockSize
|
|
||||||
self.rows = [0] * self.config.blockSize
|
self.rows = [0] * self.config.blockSize
|
||||||
self.columns = [0] * self.config.blockSize
|
self.columns = [0] * self.config.blockSize
|
||||||
self.broadcasted = Block(self.config.blockSize)
|
self.broadcasted = Block(self.config.blockSize)
|
||||||
|
|
||||||
|
|
||||||
def checkRowsColumns(self, validators):
|
def checkRowsColumns(self, validators):
|
||||||
"""It checks how many validators have been assigned to each row and column."""
|
"""It checks how many validators have been assigned to each row and column."""
|
||||||
for val in validators:
|
for val in validators:
|
||||||
@ -39,11 +38,6 @@ class Observer:
|
|||||||
if self.rows[i] == 0 or self.columns[i] == 0:
|
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.warning("There is a row/column that has not been assigned", extra=self.format)
|
||||||
|
|
||||||
def setGoldenData(self, block):
|
|
||||||
"""Stores the original real data to compare it with future situations."""
|
|
||||||
for i in range(self.config.blockSize*self.config.blockSize):
|
|
||||||
self.goldenData[i] = block.data[i]
|
|
||||||
|
|
||||||
def checkBroadcasted(self):
|
def checkBroadcasted(self):
|
||||||
"""It checks how many broadcasted samples are still missing in the network."""
|
"""It checks how many broadcasted samples are still missing in the network."""
|
||||||
zeros = 0
|
zeros = 0
|
||||||
|
|||||||
@ -55,7 +55,6 @@ class Simulator:
|
|||||||
val = Validator(i, int(not i!=0), self.logger, self.shape)
|
val = Validator(i, int(not i!=0), self.logger, self.shape)
|
||||||
if i == self.proposerID:
|
if i == self.proposerID:
|
||||||
val.initBlock()
|
val.initBlock()
|
||||||
self.glob.setGoldenData(val.block)
|
|
||||||
else:
|
else:
|
||||||
val.logIDs()
|
val.logIDs()
|
||||||
self.validators.append(val)
|
self.validators.append(val)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user