From 87d25e4ce34fd6304bffe6db4be8f840f257f72c Mon Sep 17 00:00:00 2001 From: jMyles Date: Thu, 14 Dec 2017 21:18:25 -0800 Subject: [PATCH] Pushing logic to match KFrags with Contracts down into Policy. --- nkms/characters.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/nkms/characters.py b/nkms/characters.py index aeb03a634..10da0923d 100644 --- a/nkms/characters.py +++ b/nkms/characters.py @@ -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