Special error for the scenario in which we have already contacted *too many* Ursulas.

pull/145/head
jMyles 2017-12-14 20:33:56 -08:00
parent 5ba1435c21
commit ef4cf13dc6
1 changed files with 6 additions and 0 deletions

View File

@ -209,6 +209,12 @@ class Policy(object):
self._encrypted_challenge_pack = encrypted_challenge_pack
class MoreContractsThanKFrags(TypeError):
"""
Raised when a Policy has been used to generate Contracts with Ursulas in sufficient number
such that we don't have enough KFrags to give to each Ursula.
"""
@property
def n(self):
return len(self.kfrags)