mirror of https://github.com/nucypher/nucypher.git
Patch for ETHCapeTown demo.
parent
db56606e64
commit
f41a5600f0
|
@ -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 "
|
||||||
|
|
Loading…
Reference in New Issue