Patch for ETHCapeTown demo.

pull/1040/head
jMyles 2019-04-20 18:59:48 +02:00 committed by Kieran Prasch
parent db56606e64
commit f41a5600f0
No known key found for this signature in database
GPG Key ID: 199AB839D4125A62
1 changed files with 3 additions and 2 deletions

View File

@ -180,7 +180,8 @@ class Alice(Character, PolicyAuthor):
expiration=None, expiration=None,
value=None, value=None,
handpicked_ursulas=None, handpicked_ursulas=None,
timeout=10): timeout=10,
discover_on_this_thread=False):
if not m: if not m:
# TODO: get m from config #176 # TODO: get m from config #176
@ -221,7 +222,7 @@ class Alice(Character, PolicyAuthor):
# If we're federated only, we need to block to make sure we have enough nodes. # If we're federated only, we need to block to make sure we have enough nodes.
if self.federated_only and len(self.known_nodes) < n: if self.federated_only and len(self.known_nodes) < n:
good_to_go = self.block_until_number_of_known_nodes_is(n, learn_on_this_thread=True, timeout=timeout) good_to_go = self.block_until_number_of_known_nodes_is(n, learn_on_this_thread=discover_on_this_thread, timeout=timeout)
if not good_to_go: if not good_to_go:
raise ValueError( raise ValueError(
"To make a Policy in federated mode, you need to know about " "To make a Policy in federated mode, you need to know about "