mirror of
https://github.com/logos-storage/das-research.git
synced 2026-01-07 15:43:08 +00:00
simplify code
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
952d191ccd
commit
af124c0755
@ -10,14 +10,6 @@ class Observer:
|
|||||||
self.config = config
|
self.config = config
|
||||||
self.format = {"entity": "Observer"}
|
self.format = {"entity": "Observer"}
|
||||||
self.logger = logger
|
self.logger = logger
|
||||||
self.block = []
|
|
||||||
self.rows = []
|
|
||||||
self.columns = []
|
|
||||||
self.broadcasted = []
|
|
||||||
|
|
||||||
|
|
||||||
def reset(self):
|
|
||||||
"""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.rows = [0] * self.config.blockSize
|
self.rows = [0] * self.config.blockSize
|
||||||
self.columns = [0] * self.config.blockSize
|
self.columns = [0] * self.config.blockSize
|
||||||
|
|||||||
@ -27,7 +27,6 @@ class Simulator:
|
|||||||
def initValidators(self):
|
def initValidators(self):
|
||||||
"""It initializes all the validators in the network."""
|
"""It initializes all the validators in the network."""
|
||||||
self.glob = Observer(self.logger, self.shape)
|
self.glob = Observer(self.logger, self.shape)
|
||||||
self.glob.reset()
|
|
||||||
self.validators = []
|
self.validators = []
|
||||||
if self.config.evenLineDistribution:
|
if self.config.evenLineDistribution:
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user