Skip to content
Snippets Groups Projects
Commit 82250db4 authored by inertia's avatar inertia
Browse files

api_name propagation

parent 1635b36f
No related branches found
No related tags found
No related merge requests found
...@@ -52,7 +52,7 @@ module Hive ...@@ -52,7 +52,7 @@ module Hive
if !!block if !!block
index = 0 index = 0
@rpc_client.rpc_batch_execute(request_object: request_object) do |result, error, id| @rpc_client.rpc_batch_execute(api_name: self.class.api_name, request_object: request_object) do |result, error, id|
block_num = sub_range.to_a[index] block_num = sub_range.to_a[index]
index = index + 1 index = index + 1
...@@ -66,7 +66,7 @@ module Hive ...@@ -66,7 +66,7 @@ module Hive
else else
blocks = [] blocks = []
@rpc_client.rpc_batch_execute(request_object: request_object) do |result, error, id| @rpc_client.rpc_batch_execute(api_name: self.class.api_name, request_object: request_object) do |result, error, id|
blocks << result blocks << result
end end
end end
......
...@@ -90,7 +90,7 @@ module Hive ...@@ -90,7 +90,7 @@ module Hive
end end
for request_object in chunks do for request_object in chunks do
@rpc_client.rpc_batch_execute(request_object: request_object) do |result, error, id| @rpc_client.rpc_batch_execute(api_name: self.class.api_name, request_object: request_object) do |result, error, id|
api, method = method_map[id] api, method = method_map[id]
api = api.to_sym api = api.to_sym
method = method.to_sym method = method.to_sym
......
...@@ -63,7 +63,7 @@ module Hive ...@@ -63,7 +63,7 @@ module Hive
} }
@api.get_transaction(options) do |result| @api.get_transaction(options) do |result|
assert_equal Hashie::Array, result.history.class assert_equal Hashie::Mash, result.class
end end
end end
end end
......
...@@ -299,7 +299,9 @@ module Hive ...@@ -299,7 +299,9 @@ module Hive
assert_raises SocketError, Errno::ECONNREFUSED do assert_raises SocketError, Errno::ECONNREFUSED do
jsonrpc = Jsonrpc.new(url: 'https://bad.node') jsonrpc = Jsonrpc.new(url: 'https://bad.node')
jsonrpc.get_methods jsonrpc.get_methods
# :nocov:
fail 'regression detected, SocketError or Errno::ECONNREFUSED expected' fail 'regression detected, SocketError or Errno::ECONNREFUSED expected'
# :nocov:
end end
end end
end end
......
...@@ -138,6 +138,7 @@ module Hive ...@@ -138,6 +138,7 @@ module Hive
end end
def test_operations_by_deprecated_type def test_operations_by_deprecated_type
votes_found = false
options = { options = {
until_block_num: @last_irreversible_block_num + 1, until_block_num: @last_irreversible_block_num + 1,
types: :vote types: :vote
...@@ -148,7 +149,11 @@ module Hive ...@@ -148,7 +149,11 @@ module Hive
assert op assert op
assert trx_id assert trx_id
assert block_num assert block_num
votes_found = true
end end
fail 'no vote ops found' unless votes_found
end end
end end
...@@ -187,4 +192,4 @@ module Hive ...@@ -187,4 +192,4 @@ module Hive
end end
end end
end end
end end
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment