mirror of
https://github.com/logos-storage/das-research.git
synced 2026-01-03 13:43:11 +00:00
Fixed rounding error for number of nodes
This commit is contained in:
parent
0e51082f71
commit
f3f1e8664d
@ -50,8 +50,8 @@ class Simulator:
|
||||
commulativeSum = [sum(nodeCounts[:i+1]) for i in range(len(nodeCounts))]
|
||||
commulativeSum[-1] = self.shape.numberNodes
|
||||
for i, idx in enumerate(commulativeSum):
|
||||
if nodeIdx < idx:
|
||||
return i + 1
|
||||
if nodeIdx <= idx:
|
||||
return self.shape.nodeClasses[i + 1]
|
||||
|
||||
def initValidators(self):
|
||||
"""It initializes all the validators in the network."""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user