Commit 54f5b9dc authored by juga's avatar juga
Browse files

fix: v3bwfile: Clarify percent warning

about the difference between the sum of the last consensus weight and
the sum of the reported weight in the just generated Bandwidth File.
Otherwise, when looking at the warnings only, it's not explained what
the percentage is about.

Closes #40115
parent 70103358
Pipeline #23457 passed with stages
in 9 minutes and 49 seconds
...@@ -1328,8 +1328,16 @@ class V3BWFile(object): ...@@ -1328,8 +1328,16 @@ class V3BWFile(object):
sum_bw, sum_bw,
round(diff_perc), round(diff_perc),
) )
if diff_perc > MAX_BW_DIFF_PERC: if diff_perc > max_bw_diff_perc:
log.warning("It is more than %s%%.", max_bw_diff_perc) log.warning(
"The difference between the sum of the last consensus weight "
"(%s KB) and the sum of the reported weight in this Bandwidth "
"File (%s KB) is %s%%. It is more than %s%%.",
sum_consensus_bw,
sum_bw,
round(diff_perc),
max_bw_diff_perc,
)
return True return True
return False return False
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment