mirror of https://github.com/nucypher/nucypher.git
publish() for Federated logic.
parent
f5f6ef00f6
commit
1d42a797b6
|
@ -198,3 +198,15 @@ class BlockchainPolicy(Policy):
|
|||
|
||||
if len(accepted) < self.n:
|
||||
raise Exception("Selected Ursulas rejected too many arrangements") # TODO: Better exception
|
||||
|
||||
def publish(self, network_middleware) -> None:
|
||||
"""Publish enacted arrangements."""
|
||||
|
||||
if not self._enacted_arrangements:
|
||||
raise RuntimeError("There are no enacted arrangements to publish to the network.")
|
||||
|
||||
while len(self._enacted_arrangements) > 0:
|
||||
kfrag, arrangement = self._enacted_arrangements.popitem()
|
||||
arrangement.publish()
|
||||
|
||||
super().publish(network_middleware)
|
||||
|
|
|
@ -9,4 +9,4 @@ KECCAK_DIGEST_LENGTH = 32
|
|||
# These lengths are specific to secp256k1
|
||||
CAPSULE_LENGTH(98)
|
||||
PUBLIC_KEY_LENGTH(33)
|
||||
PUBLIC_ADDRESS_LENGTH(42)
|
||||
PUBLIC_ADDRESS_LENGTH(20)
|
||||
|
|
Loading…
Reference in New Issue