lib/zold/commands/fetch.rb in zold-0.19.1 vs lib/zold/commands/fetch.rb in zold-0.19.2

- old
+ new

@@ -97,10 +97,11 @@ end private def fetch(id, cps, opts) + raise "There are no remote nodes, run 'zold remote reset'" if @remotes.all.empty? start = Time.now total = Concurrent::AtomicFixnum.new nodes = Concurrent::AtomicFixnum.new done = Concurrent::AtomicFixnum.new masters = Concurrent::AtomicFixnum.new @@ -108,17 +109,17 @@ nodes.increment total.increment(fetch_one(id, r, cps, opts)) masters.increment if r.master? done.increment end - raise "There are no remote nodes, run 'zold remote reset'" if nodes.value.zero? unless opts['quiet-if-absent'] raise "No nodes out of #{nodes.value} have the wallet #{id}" if done.value.zero? if masters.value.zero? && !opts['tolerate-edges'] - raise EdgesOnly, "There are only edge nodes, run 'zold remote reset' or use --tolerate-edges" + raise EdgesOnly, "There are only edge nodes, run 'zold remote update' or use --tolerate-edges" end if nodes.value < opts['tolerate-quorum'] - raise NoQuorum, "There were not enough nodes, run 'zold remote reset' or use --tolerate-quorum=1" + raise NoQuorum, "There were not enough nodes, the required quorum is #{opts['tolerate-quorum']}; \ +run 'zold remote update' or use --tolerate-quorum=1" end end @log.info("#{done.value} copies of #{id} fetched in #{Age.new(start)} with the total score of \ #{total.value} from #{nodes.value} nodes (#{masters.value} master nodes)") list = cps.all.map do |c|