mirror of https://github.com/nucypher/nucypher.git
Pushing logic to match KFrags with Contracts down into Policy.
parent
7dec865094
commit
87d25e4ce3
|
@ -240,14 +240,7 @@ class Alice(Character):
|
|||
# deposits and expirations on a limited number of Ursulas.
|
||||
# Users may decide to inject some market strategies here.
|
||||
found_ursulas = policy.find_ursulas(networky_stuff, deposit, expiration, num_ursulas=n)
|
||||
|
||||
for ursula, contract, result in found_ursulas:
|
||||
if result.was_accepted: # TODO: Here, we need to assess the result and see if we're actually good to go.
|
||||
kfrag = policy.assign_kfrag_to_contract(contract)
|
||||
contract.activate(kfrag, ursula, result)
|
||||
|
||||
# TODO: What if there weren't enough Contracts approved to distribute n kfrags? We need to raise NotEnoughQualifiedUrsulas.
|
||||
|
||||
policy.match_kfrags_to_found_ursulas(found_ursulas)
|
||||
policy.enact(networky_stuff) # REST call happens here, as does population of TreasureMap.
|
||||
|
||||
return policy
|
||||
|
|
Loading…
Reference in New Issue