Better error when there's not enough wiggle room to sample.

pull/1040/head
jMyles 2019-05-17 13:39:57 -04:00 committed by Kieran Prasch
parent 94f273d70c
commit 051bbe88dc
No known key found for this signature in database
GPG Key ID: 199AB839D4125A62
1 changed files with 1 additions and 1 deletions

View File

@ -246,7 +246,7 @@ class MinerAgent(EthereumContractAgent):
miners_population = self.get_miner_population()
if quantity > miners_population:
raise self.NotEnoughMiners('{} miners are available'.format(miners_population))
raise self.NotEnoughMiners('{} miners are available, need {} (for wiggle room)'.format(miners_population, quantity))
system_random = random.SystemRandom()
n_select = round(quantity*additional_ursulas) # Select more Ursulas