mirror of
https://github.com/logos-storage/das-research.git
synced 2026-01-07 15:43:08 +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
|
sampleProgress = arrived / expected
|
||||||
nodeProgress = ready / (len(validators)-1)
|
nodeProgress = ready / (len(validators)-1)
|
||||||
validatorCnt = sum([v.vpn for v in validators[1:]])
|
validatorCnt = sum([v.vpn for v in validators[1:]])
|
||||||
validatorAllProgress = validatedall / validatorCnt
|
validatorAllProgress = (validatedall / validatorCnt) if validatorCnt != 0 else 1
|
||||||
validatorProgress = validated / validatorCnt
|
validatorProgress = (validated / validatorCnt) if validatorCnt != 0 else 1
|
||||||
|
|
||||||
return missingSamples, sampleProgress, nodeProgress, validatorAllProgress, validatorProgress
|
return missingSamples, sampleProgress, nodeProgress, validatorAllProgress, validatorProgress
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user