mirror of
https://github.com/codex-storage/das-research.git
synced 2025-02-23 08:18:14 +00:00
move initBlock code after network setup
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
cec9b9f6a7
commit
293914e1c3
@ -91,10 +91,6 @@ class Simulator:
|
|||||||
|
|
||||||
else:
|
else:
|
||||||
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:
|
|
||||||
val.initBlock()
|
|
||||||
else:
|
|
||||||
val.logIDs()
|
|
||||||
self.validators.append(val)
|
self.validators.append(val)
|
||||||
|
|
||||||
assignedRows.sort()
|
assignedRows.sort()
|
||||||
@ -219,6 +215,11 @@ class Simulator:
|
|||||||
def run(self):
|
def run(self):
|
||||||
"""It runs the main simulation until the block is available or it gets stucked."""
|
"""It runs the main simulation until the block is available or it gets stucked."""
|
||||||
self.glob.checkRowsColumns(self.validators)
|
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)
|
arrived, expected, ready, validatedall, validated = self.glob.checkStatus(self.validators)
|
||||||
missingSamples = expected - arrived
|
missingSamples = expected - arrived
|
||||||
missingVector = []
|
missingVector = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user