aboutsummaryrefslogtreecommitdiff
path: root/tests/block_weight
diff options
context:
space:
mode:
authorstoffu <stoffu@protonmail.ch>2019-04-09 19:13:55 +0900
committerstoffu <stoffu@protonmail.ch>2019-04-09 19:40:57 +0900
commit467f4c7ed303ca56bb0545716791c84fe11e3ce6 (patch)
treea38dba2ac0b01245a448565df768c8b26c05e549 /tests/block_weight
parenttests/block_weight: remove unused MULTIPLIER_SMALL (diff)
downloadmonero-467f4c7ed303ca56bb0545716791c84fe11e3ce6.tar.xz
tests/block_weight: use integer division when computing median
Diffstat (limited to 'tests/block_weight')
-rwxr-xr-xtests/block_weight/block_weight.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/block_weight/block_weight.py b/tests/block_weight/block_weight.py
index ae75844e2..b23da3d77 100755
--- a/tests/block_weight/block_weight.py
+++ b/tests/block_weight/block_weight.py
@@ -23,9 +23,9 @@ def get_median(vec):
#temp = vec
temp = sorted(vec)
if len(temp) % 2 == 1:
- return temp[len(temp)/2]
+ return temp[len(temp)//2]
else:
- return int((temp[len(temp)/2]+temp[len(temp)/2-1])/2)
+ return int((temp[len(temp)//2]+temp[len(temp)//2-1])//2)
def LCG():
global lcg_seed