Commit 788a777f authored by juga's avatar juga
Browse files

fix: v3bwfile: Use cap argument to clip scaled bw

Make test pass, though the value is not correct since it needs to be
rounded after clipping
parent ce4ad675
......@@ -1330,7 +1330,7 @@ class V3BWFile(object):
# bw sum (Torflow's tot_net_bw or tot_sbw)
sum_bw = sum([l.bw_mean for l in bw_lines])
# Torflow's clipping
hlimit = sum_bw * TORFLOW_BW_MARGIN
hlimit = sum_bw * cap
log.debug('sum %s', sum_bw)
log.debug('mu %s', mu)
log.debug('muf %s', muf)
......@@ -336,7 +336,7 @@ def test_torflow_scale(mock_consensus, datadir, tmpdir, conf):
assert v3bwfile.bw_lines[0].bw == 123
assert v3bwfile.bw_lines[0].bw == 6.1423000000000005
v3bwfile = V3BWFile.from_results(results, '', '',
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