lib/zold/stress/pool.rb in zold-stress-0.1.0 vs lib/zold/stress/pool.rb in zold-stress-0.2.0

- old
+ new

@@ -65,10 +65,11 @@ Zold::Create.new(wallets: @wallets, log: @vlog).run( ['create', "--public-key=#{f.path}", "--network=#{@opts['network']}"] + @opts.arguments ) end end - return unless balances[0][:balance].zero? - raise "There is no money in the pool of #{balances.count} wallets at #{@wallets.path}" + return if balances.find { |b| b[:balance].positive? } + raise "There is not a single wallet among #{balances.count} with a positive balance, in #{@wallets.path}: \ + #{balances.map { |b| "#{b[:id]}: #{b[:balance]}" }.join("\n")}" end end end