fix line allocation when evenLineDistribution=True

vector should have chi elements for each validator

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
Csaba Kiraly 2023-03-29 15:49:52 +02:00
parent bcf3098e9f
commit f85cdb401b
No known key found for this signature in database
GPG Key ID: 0FE274EE8C95166E
1 changed files with 3 additions and 2 deletions

View File

@ -46,8 +46,9 @@ class Simulator:
lightVal = int(self.shape.numberNodes * self.shape.class1ratio * self.shape.vpn1)
heavyVal = int(self.shape.numberNodes * (1-self.shape.class1ratio) * self.shape.vpn2)
totalValidators = lightVal + heavyVal
rows = list(range(self.shape.blockSize)) * (int(totalValidators/self.shape.blockSize)+1)
columns = list(range(self.shape.blockSize)) * (int(totalValidators/self.shape.blockSize)+1)
totalRows = totalValidators * self.shape.chi
rows = list(range(self.shape.blockSize)) * (int(totalRows/self.shape.blockSize)+1)
columns = list(range(self.shape.blockSize)) * (int(totalRows/self.shape.blockSize)+1)
offset = heavyVal*self.shape.chi
random.shuffle(rows)
random.shuffle(columns)