[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 02/04: follow-up
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 02/04: follow-up |
Date: |
Thu, 17 May 2018 17:43:21 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnunet.
commit 36a3e39e84cae138dc944755134c81103daca598
Author: Nils Gillmann <address@hidden>
AuthorDate: Thu May 17 15:15:44 2018 +0000
follow-up
Signed-off-by: Nils Gillmann <address@hidden>
---
src/consensus/consensus-simulation.py.in | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/consensus/consensus-simulation.py.in
b/src/consensus/consensus-simulation.py.in
index 71a91302e..fbad9f678 100644
--- a/src/consensus/consensus-simulation.py.in
+++ b/src/consensus/consensus-simulation.py.in
@@ -21,7 +21,7 @@ from __future__ import absolute_import
from __future__ import print_function
import argparse
import random
-from math import ceil,log,floor
+from math import ceil, log, floor
def bsc(n):
@@ -57,7 +57,7 @@ def simulate(k, n, verbose):
arc = 1
while arc <= largest_arc:
if verbose:
- prin( "-- subround --")
+ print("-- subround --")
new_info = [x for x in info]
for peer_physical in xrange(n):
peer_logical = peers[peer_physical]
@@ -71,7 +71,7 @@ def simulate(k, n, verbose):
if peer_logical & arc == 0:
# we are outgoing
if verbose:
- print peer_physical, "connects to", partner_physical
+ print(peer_physical, "connects to", partner_physical)
peer_type = "outgoing"
if peer_logical < num_ghosts:
# we have a ghost, check if the peer who connects
@@ -86,7 +86,7 @@ def simulate(k, n, verbose):
if verbose > 1:
print("type of", str(peer_physical) + ":", peer_type)
info = new_info
- arc = arc << 1;
+ arc = arc << 1
rounds = rounds + 1
random.shuffle(peers)
return rounds
@@ -100,7 +100,7 @@ if __name__ == "__main__":
parser.add_argument('--verbose', '-v', action='count')
args = parser.parse_args()
- sum = 0.0;
- for n in xrange (0, args.r):
+ sum = 0.0
+ for n in xrange(0, args.r):
sum += simulate(args.k, args.n, args.verbose)
print(sum / args.r)
--
To stop receiving notification emails like this one, please contact
address@hidden