lib/universa/client.rb in universa-0.1.5 vs lib/universa/client.rb in universa-0.1.6
- old
+ new
@@ -129,13 +129,10 @@
}
nodes = candidates.values.group_by(&:url)
.transform_values!(&:sort)
# We roughly assume the full network size as:
network_max_size = nodes.size
- nodes.each {|k, v|
- puts "#{k}: (#{v.size}) #{v.map(&:rate)}}"
- }
# Refine result: takes most voted nodes and only these with 80% consensus
# and map it to Connection objects
min_rate = n * 0.8
@nodes = nodes.values.map {|v| v[-1]}.delete_if {|v| v.rate < min_rate}
.map {|ni| Connection.new(self, ni)}
@@ -204,12 +201,10 @@
# to the node.
#
# @param [String|Symbol] name of the command
# @return [SmartHash] with the command result
def execute name, **kwargs
- Service.umi.with_trace {
- connection.command name.to_s, *kwargs.to_a.flatten
- }
+ connection.command name.to_s, *kwargs.to_a.flatten
end
protected
def connection