From 26d49c72e190013e99fdec3bd8f065e522b582ae Mon Sep 17 00:00:00 2001 From: Nils Gillmann Date: Sat, 19 May 2018 17:21:42 +0000 Subject: src/consensus/consensus-simulation: Use past.builtins for xrange Signed-off-by: Nils Gillmann --- README | 4 ++-- src/consensus/consensus-simulation.py.in | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README b/README index f52fca444..80a87d274 100644 --- a/README +++ b/README @@ -264,8 +264,8 @@ $ make $ make install $ make check -Some of the testcases require python >= 2.6 and pexpect to be -installed. If any testcases fail to pass on your system, run +Some of the testcases require python >= 2.6 (+ the python module "futures") +and pexpect to be installed. If any testcases fail to pass on your system, run "contrib/scripts/report.sh" (in the repository) or "gnunet-bugreport" when you already have GNUnet installed and report the output together with information about the failing testcase to the Mantis bugtracking diff --git a/src/consensus/consensus-simulation.py.in b/src/consensus/consensus-simulation.py.in index 12bef871d..6629ffaa8 100644 --- a/src/consensus/consensus-simulation.py.in +++ b/src/consensus/consensus-simulation.py.in @@ -22,6 +22,7 @@ from __future__ import print_function import argparse import random from math import ceil, log, floor +from past.builtins import xrange def bsc(n): @@ -44,6 +45,8 @@ def simulate(k, n, verbose): print("we have", num_ghosts, "ghost peers") # n.b. all peers with idx