mirror of https://github.com/nucypher/nucypher.git
Different map classes for different policy modes.
parent
f4fc313a45
commit
6e163a1ba0
|
@ -124,7 +124,6 @@ class BlockchainArrangement(Arrangement):
|
|||
expiration: maya.MayaDT,
|
||||
duration_periods: int,
|
||||
*args, **kwargs):
|
||||
|
||||
super().__init__(alice=alice, ursula=ursula, expiration=expiration, *args, **kwargs)
|
||||
|
||||
# The relationship exists between two addresses
|
||||
|
@ -311,7 +310,6 @@ class Policy(ABC):
|
|||
return PolicyCredential(self.alice.stamp, self.label, self.expiration,
|
||||
self.public_key, treasure_map)
|
||||
|
||||
|
||||
def __assign_kfrags(self) -> Generator[Arrangement, None, None]:
|
||||
|
||||
if len(self._accepted_arrangements) < self.n:
|
||||
|
@ -468,7 +466,6 @@ class Policy(ABC):
|
|||
|
||||
|
||||
class FederatedPolicy(Policy):
|
||||
|
||||
_arrangement_class = Arrangement
|
||||
from nucypher.policy.collections import TreasureMap as _treasure_map_class # TODO: Circular Import
|
||||
|
||||
|
@ -682,5 +679,6 @@ class BlockchainPolicy(Policy):
|
|||
label=self.label)
|
||||
# Sign the map.
|
||||
transacting_power = self.alice._crypto_power.power_ups(TransactingPower)
|
||||
self.publish_treasure_map(network_middleware=network_middleware, blockchain_signer=transacting_power.sign_message)
|
||||
self.publish_treasure_map(network_middleware=network_middleware,
|
||||
blockchain_signer=transacting_power.sign_message)
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue