Skip to content
Snippets Groups Projects
Commit 6927f6ab authored by inertia's avatar inertia
Browse files

Merge branch 'eclipse' into 'master'

gem bump; version bump

See merge request !2
parents e3488ddf 8fa18414
No related branches found
No related tags found
1 merge request!2gem bump; version bump
Pipeline #20360 failed
...@@ -32,7 +32,7 @@ Gem::Specification.new do |spec| ...@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'json', '~> 2.1', '>= 2.1.0' spec.add_dependency 'json', '~> 2.1', '>= 2.1.0'
spec.add_dependency 'logging', '~> 2.2', '>= 2.2.0' spec.add_dependency 'logging', '~> 2.2', '>= 2.2.0'
spec.add_dependency 'hashie', '~> 3.5', '>= 3.5.7' spec.add_dependency 'hashie', '~> 4.1', '>= 3.5.7'
spec.add_dependency 'bitcoin-ruby', '~> 0.0', '0.0.20' spec.add_dependency 'bitcoin-ruby', '~> 0.0', '0.0.20'
spec.add_dependency 'ffi', '~> 1.9', '>= 1.9.23' spec.add_dependency 'ffi', '~> 1.9', '>= 1.9.23'
spec.add_dependency 'bindata', '~> 2.4', '>= 2.4.4' spec.add_dependency 'bindata', '~> 2.4', '>= 2.4.4'
......
module Hive module Hive
VERSION = '1.0.1' VERSION = '1.0.2'
AGENT_ID = "hive-ruby/#{VERSION}" AGENT_ID = "hive-ruby/#{VERSION}"
end end
...@@ -43,6 +43,40 @@ module Hive ...@@ -43,6 +43,40 @@ module Hive
end end
end end
def test_get_account_history_with_op_mask
vcr_cassette('account_history_api_get_account_history_with_op_mask', record: :once) do
# We're looking specifically for comment_operation, therefore, for the
# first 64 operation types (as defined in protocol/operations.hpp), we set
# the corresponding bit in operation_filter_low; for the higher-numbered
# operations, set the bit in operation_filter_high (pretending
# operation_filter is a 128-bit bitmask composed of
# {operation_filter_high, operation_filter_low})
#
# Note, we don't really use the operation_filter_high because
# comment_operation is the second flag. In fact, operation_filter_high
# could even be nil, if we wanted.
#
# https://gitlab.syncad.com/hive/hive/-/blob/master/libraries/protocol/include/hive/protocol/operations.hpp
operation_mask = 0x02 # comment_operation
operation_filter_low = operation_mask & 0xFFFFFFFF
operation_filter_high = (operation_mask & 0xFFFFFFFF00000000) >> 32
options = {
account: 'hiveio',
start: 0,
limit: 0,
include_reversible: true,
operation_filter_low: operation_filter_low,
operation_filter_high: operation_filter_high
}
@api.get_account_history(options) do |result|
assert_equal Hashie::Array, result.history.class
end
end
end
def test_get_ops_in_block def test_get_ops_in_block
vcr_cassette('account_history_api_get_ops_in_block', record: :once) do vcr_cassette('account_history_api_get_ops_in_block', record: :once) do
options = { options = {
......
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