GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Commit d72fe2ee authored by juga  's avatar juga 💬

fix: v3bwfile: Remove unneeded minimum 1

since rounding already returns 1 as minimum.
parent 5d0e63cb
......@@ -1434,9 +1434,7 @@ class V3BWFile(object):
for l in bw_lines_tf:
bw_scaled = min(hlimit, l.bw)
# round and convert to KB
bw_new = kb_round_x_sig_dig(bw_scaled, digits=num_round_dig)
# avoid 0
l.bw = max(bw_new, 1)
l.bw = kb_round_x_sig_dig(bw_scaled, digits=num_round_dig)
return sorted(bw_lines_tf, key=lambda x: x.bw, reverse=reverse)
@staticmethod
......
Markdown is supported
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