summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README4
-rw-r--r--src/consensus/consensus-simulation.py.in3
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<k are evil
peers = range(n)
+ # py2-3 compatible, backwards.
+ # refer to http://python-future.org/compatible_idioms.html#xrange
info = [1 << x for x in xrange(n)]
def done_p():