mirror of https://github.com/nucypher/nucypher.git
OK, let's return the mature node here afterall. Saves the awkward rename.
parent
bbe8588700
commit
f3dddf4b06
|
@ -53,8 +53,7 @@ class NucypherMiddlewareClient:
|
|||
"""
|
||||
if node_or_sprout:
|
||||
if node_or_sprout is not EXEMPT_FROM_VERIFICATION:
|
||||
node_or_sprout.mature() # Morph into a node.
|
||||
node = node_or_sprout # Definitely a node.
|
||||
node = node_or_sprout.mature() # Morph into a node.
|
||||
node.verify_node(network_middleware_client=self, registry=self.registry)
|
||||
return self.parse_node_or_host_and_port(node_or_sprout, host, port)
|
||||
|
||||
|
|
|
@ -271,6 +271,7 @@ class NodeSprout(PartiallyKwargifiedBytes):
|
|||
|
||||
self.__class__ = mature_node.__class__
|
||||
self.__dict__ = mature_node.__dict__
|
||||
return self # To reduce the awkwardity of renaming; this is always the weird part of polymorphism for me.
|
||||
|
||||
|
||||
class Learner:
|
||||
|
@ -1011,6 +1012,8 @@ class Teacher:
|
|||
"""
|
||||
This is the most mature form, so we do nothing.
|
||||
"""
|
||||
return self
|
||||
|
||||
@classmethod
|
||||
def set_federated_mode(cls, federated_only: bool):
|
||||
cls._federated_only_instances = federated_only
|
||||
|
|
Loading…
Reference in New Issue