mirror of
https://github.com/logos-storage/das-research.git
synced 2026-01-04 06:03:10 +00:00
Divide by 0 error fix for Node with 0 validators
This commit is contained in:
parent
588ead24f9
commit
f5f2131a45
@ -83,8 +83,8 @@ class Observer:
|
||||
sampleProgress = arrived / expected
|
||||
nodeProgress = ready / (len(validators)-1)
|
||||
validatorCnt = sum([v.vpn for v in validators[1:]])
|
||||
validatorAllProgress = validatedall / validatorCnt
|
||||
validatorProgress = validated / validatorCnt
|
||||
validatorAllProgress = (validatedall / validatorCnt) if validatorCnt != 0 else 1
|
||||
validatorProgress = (validated / validatorCnt) if validatorCnt != 0 else 1
|
||||
|
||||
return missingSamples, sampleProgress, nodeProgress, validatorAllProgress, validatorProgress
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user