mirror of
https://github.com/logos-storage/das-research.git
synced 2026-01-10 17:13:09 +00:00
move initBlock code after network setup
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
77057d336d
commit
14a408f7d6
@ -69,10 +69,6 @@ class Simulator:
|
||||
val = Validator(i, int(not i!=0), self.logger, self.shape, self.config, r, c)
|
||||
else:
|
||||
val = Validator(i, int(not i!=0), self.logger, self.shape, self.config)
|
||||
if i == self.proposerID:
|
||||
val.initBlock()
|
||||
else:
|
||||
val.logIDs()
|
||||
self.validators.append(val)
|
||||
self.logger.debug("Validators initialized.", extra=self.format)
|
||||
|
||||
@ -169,6 +165,11 @@ class Simulator:
|
||||
def run(self):
|
||||
"""It runs the main simulation until the block is available or it gets stucked."""
|
||||
self.glob.checkRowsColumns(self.validators)
|
||||
for i in range(0,self.shape.numberNodes):
|
||||
if i == self.proposerID:
|
||||
self.validators[i].initBlock()
|
||||
else:
|
||||
self.validators[i].logIDs()
|
||||
arrived, expected, ready, validatedall, validated = self.glob.checkStatus(self.validators)
|
||||
missingSamples = expected - arrived
|
||||
missingVector = []
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user