[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated: src/consensus/consensus-sim
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated: src/consensus/consensus-simulation: Use past.builtins for xrange |
Date: |
Sat, 19 May 2018 19:21:17 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 26d49c72e src/consensus/consensus-simulation: Use past.builtins for
xrange
26d49c72e is described below
commit 26d49c72e190013e99fdec3bd8f065e522b582ae
Author: Nils Gillmann <address@hidden>
AuthorDate: Sat May 19 17:21:42 2018 +0000
src/consensus/consensus-simulation: Use past.builtins for xrange
Signed-off-by: Nils Gillmann <address@hidden>
---
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<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():
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnunet] branch master updated: src/consensus/consensus-simulation: Use past.builtins for xrange,
gnunet <=