Skip to content

Commit

Permalink
fix SMT version of patterns for tests that changed due to bip_0062 si…
Browse files Browse the repository at this point in the history
…gnatures always being used
  • Loading branch information
ABW committed May 13, 2024
1 parent 064e3b3 commit 9c4f655
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions tests/unit/plugin_tests/condenser_api_account_history_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,11 @@ BOOST_AUTO_TEST_CASE( get_account_history_hf13 )

expected_t expected_dan0ah_history = { {
#ifdef HIVE_ENABLE_SMT //SMTs have different patterns due to different nonces in pow/pow2
R"~([0,{"trx_id":"8315222e19ca72ee668672e6e8c53aa4a89ce42d","block":3,"trx_in_block":0,"op_in_trx":0,"virtual_op":false,"timestamp":"2016-01-01T00:00:06","op":{"type":"pow2_operation","value":{"work":{"type":"pow2","value":{"input":{"worker_account":"dan0ah","prev_block":"00000002506ae2952bf6c6d4f0ca606cf6089fea","nonce":9},"pow_summary":4219531556}},"new_owner_key":"STM7YJmUoKbPQkrMrZbrgPxDMYJA3uD3utaN3WYRwaFGKYbQ9ftKV","props":{"account_creation_fee":{"amount":"0","precision":3,"nai":"@@000000021"},"maximum_block_size":131072,"hbd_interest_rate":1000}}},"operation_id":0}])~",
R"~([0,{"trx_id":"8315222e19ca72ee668672e6e8c53aa4a89ce42d","block":3,"trx_in_block":0,"op_in_trx":0,"virtual_op":false,"timestamp":"2016-01-01T00:00:06","op":["pow2",{"work":["pow2",{"input":{"worker_account":"dan0ah","prev_block":"00000002506ae2952bf6c6d4f0ca606cf6089fea","nonce":9},"pow_summary":4219531556}],"new_owner_key":"STM7YJmUoKbPQkrMrZbrgPxDMYJA3uD3utaN3WYRwaFGKYbQ9ftKV","props":{"account_creation_fee":"0.000 TESTS","maximum_block_size":131072,"hbd_interest_rate":1000}}]}])~"
R"~([0,{"trx_id":"47fae6df13c7117800ec407bafb1afc62f918cd3","block":3,"trx_in_block":0,"op_in_trx":0,"virtual_op":false,"timestamp":"2016-01-01T00:00:06","op":{"type":"pow2_operation","value":{"work":{"type":"pow2","value":{"input":{"worker_account":"dan0ah","prev_block":"000000024912184de38f50b4c83440750981ccbd","nonce":24},"pow_summary":4196506260}},"new_owner_key":"STM7YJmUoKbPQkrMrZbrgPxDMYJA3uD3utaN3WYRwaFGKYbQ9ftKV","props":{"account_creation_fee":{"amount":"0","precision":3,"nai":"@@000000021"},"maximum_block_size":131072,"hbd_interest_rate":1000}}},"operation_id":0}])~",
R"~([0,{"trx_id":"47fae6df13c7117800ec407bafb1afc62f918cd3","block":3,"trx_in_block":0,"op_in_trx":0,"virtual_op":false,"timestamp":"2016-01-01T00:00:06","op":["pow2",{"work":["pow2",{"input":{"worker_account":"dan0ah","prev_block":"000000024912184de38f50b4c83440750981ccbd","nonce":24},"pow_summary":4196506260}],"new_owner_key":"STM7YJmUoKbPQkrMrZbrgPxDMYJA3uD3utaN3WYRwaFGKYbQ9ftKV","props":{"account_creation_fee":"0.000 TESTS","maximum_block_size":131072,"hbd_interest_rate":1000}}]}])~"
}, {
R"~([1,{"trx_id":"8315222e19ca72ee668672e6e8c53aa4a89ce42d","block":3,"trx_in_block":0,"op_in_trx":1,"virtual_op":true,"timestamp":"2016-01-01T00:00:06","op":{"type":"account_created_operation","value":{"new_account_name":"dan0ah","creator":"dan0ah","initial_vesting_shares":{"amount":"0","precision":6,"nai":"@@000000037"},"initial_delegation":{"amount":"0","precision":6,"nai":"@@000000037"}}},"operation_id":0}])~",
R"~([1,{"trx_id":"8315222e19ca72ee668672e6e8c53aa4a89ce42d","block":3,"trx_in_block":0,"op_in_trx":1,"virtual_op":true,"timestamp":"2016-01-01T00:00:06","op":["account_created",{"new_account_name":"dan0ah","creator":"dan0ah","initial_vesting_shares":"0.000000 VESTS","initial_delegation":"0.000000 VESTS"}]}])~"
R"~([1,{"trx_id":"47fae6df13c7117800ec407bafb1afc62f918cd3","block":3,"trx_in_block":0,"op_in_trx":1,"virtual_op":true,"timestamp":"2016-01-01T00:00:06","op":{"type":"account_created_operation","value":{"new_account_name":"dan0ah","creator":"dan0ah","initial_vesting_shares":{"amount":"0","precision":6,"nai":"@@000000037"},"initial_delegation":{"amount":"0","precision":6,"nai":"@@000000037"}}},"operation_id":0}])~",
R"~([1,{"trx_id":"47fae6df13c7117800ec407bafb1afc62f918cd3","block":3,"trx_in_block":0,"op_in_trx":1,"virtual_op":true,"timestamp":"2016-01-01T00:00:06","op":["account_created",{"new_account_name":"dan0ah","creator":"dan0ah","initial_vesting_shares":"0.000000 VESTS","initial_delegation":"0.000000 VESTS"}]}])~"
#else
R"~([0,{"trx_id":"ff3ec48842cf338b6a5905e817daea3cd12b0dd4","block":3,"trx_in_block":0,"op_in_trx":0,"virtual_op":false,"timestamp":"2016-01-01T00:00:06","op":{"type":"pow2_operation","value":{"work":{"type":"pow2","value":{"input":{"worker_account":"dan0ah","prev_block":"00000002a8c7664246009c0f84f09687dfb9ec55","nonce":8},"pow_summary":4211230234}},"new_owner_key":"STM7YJmUoKbPQkrMrZbrgPxDMYJA3uD3utaN3WYRwaFGKYbQ9ftKV","props":{"account_creation_fee":{"amount":"0","precision":3,"nai":"@@000000021"},"maximum_block_size":131072,"hbd_interest_rate":1000}}},"operation_id":0}])~",
R"~([0,{"trx_id":"ff3ec48842cf338b6a5905e817daea3cd12b0dd4","block":3,"trx_in_block":0,"op_in_trx":0,"virtual_op":false,"timestamp":"2016-01-01T00:00:06","op":["pow2",{"work":["pow2",{"input":{"worker_account":"dan0ah","prev_block":"00000002a8c7664246009c0f84f09687dfb9ec55","nonce":8},"pow_summary":4211230234}],"new_owner_key":"STM7YJmUoKbPQkrMrZbrgPxDMYJA3uD3utaN3WYRwaFGKYbQ9ftKV","props":{"account_creation_fee":"0.000 TESTS","maximum_block_size":131072,"hbd_interest_rate":1000}}]}])~"
Expand Down Expand Up @@ -328,8 +328,8 @@ BOOST_AUTO_TEST_CASE( get_account_history_hf13 )

expected_t expected_initminer_history = { {
#ifdef HIVE_ENABLE_SMT //SMTs have different patterns due to different nonces in pow/pow2
R"~([19,{"trx_id":"8315222e19ca72ee668672e6e8c53aa4a89ce42d","block":3,"trx_in_block":0,"op_in_trx":2,"virtual_op":true,"timestamp":"2016-01-01T00:00:06","op":{"type":"pow_reward_operation","value":{"worker":"initminer","reward":{"amount":"1000000000000","precision":6,"nai":"@@000000037"}}},"operation_id":0}])~",
R"~([19,{"trx_id":"8315222e19ca72ee668672e6e8c53aa4a89ce42d","block":3,"trx_in_block":0,"op_in_trx":2,"virtual_op":true,"timestamp":"2016-01-01T00:00:06","op":["pow_reward",{"worker":"initminer","reward":"1000000.000000 VESTS"}]}])~"
R"~([19,{"trx_id":"47fae6df13c7117800ec407bafb1afc62f918cd3","block":3,"trx_in_block":0,"op_in_trx":2,"virtual_op":true,"timestamp":"2016-01-01T00:00:06","op":{"type":"pow_reward_operation","value":{"worker":"initminer","reward":{"amount":"1000000000000","precision":6,"nai":"@@000000037"}}},"operation_id":0}])~",
R"~([19,{"trx_id":"47fae6df13c7117800ec407bafb1afc62f918cd3","block":3,"trx_in_block":0,"op_in_trx":2,"virtual_op":true,"timestamp":"2016-01-01T00:00:06","op":["pow_reward",{"worker":"initminer","reward":"1000000.000000 VESTS"}]}])~"
#else
R"~([19,{"trx_id":"ff3ec48842cf338b6a5905e817daea3cd12b0dd4","block":3,"trx_in_block":0,"op_in_trx":2,"virtual_op":true,"timestamp":"2016-01-01T00:00:06","op":{"type":"pow_reward_operation","value":{"worker":"initminer","reward":{"amount":"1000000000000","precision":6,"nai":"@@000000037"}}},"operation_id":0}])~",
R"~([19,{"trx_id":"ff3ec48842cf338b6a5905e817daea3cd12b0dd4","block":3,"trx_in_block":0,"op_in_trx":2,"virtual_op":true,"timestamp":"2016-01-01T00:00:06","op":["pow_reward",{"worker":"initminer","reward":"1000000.000000 VESTS"}]}])~"
Expand Down
12 changes: 6 additions & 6 deletions tests/unit/plugin_tests/condenser_api_ops_in_block_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,14 @@ BOOST_AUTO_TEST_CASE( get_ops_in_block_hf13 )

expected_t expected_operations = { { // pow2_operation / first obsolete operation tested here.
#ifdef HIVE_ENABLE_SMT //SMTs have different patterns due to different nonces in pow/pow2
R"~({"trx_id":"8315222e19ca72ee668672e6e8c53aa4a89ce42d","block":3,"trx_in_block":0,"op_in_trx":0,"virtual_op":false,"timestamp":"2016-01-01T00:00:06","op":{"type":"pow2_operation","value":{"work":{"type":"pow2","value":{"input":{"worker_account":"dan0ah","prev_block":"00000002506ae2952bf6c6d4f0ca606cf6089fea","nonce":9},"pow_summary":4219531556}},"new_owner_key":"STM7YJmUoKbPQkrMrZbrgPxDMYJA3uD3utaN3WYRwaFGKYbQ9ftKV","props":{"account_creation_fee":{"amount":"0","precision":3,"nai":"@@000000021"},"maximum_block_size":131072,"hbd_interest_rate":1000}}},"operation_id":0})~",
R"~({"trx_id":"8315222e19ca72ee668672e6e8c53aa4a89ce42d","block":3,"trx_in_block":0,"op_in_trx":0,"virtual_op":false,"timestamp":"2016-01-01T00:00:06","op":["pow2",{"work":["pow2",{"input":{"worker_account":"dan0ah","prev_block":"00000002506ae2952bf6c6d4f0ca606cf6089fea","nonce":9},"pow_summary":4219531556}],"new_owner_key":"STM7YJmUoKbPQkrMrZbrgPxDMYJA3uD3utaN3WYRwaFGKYbQ9ftKV","props":{"account_creation_fee":"0.000 TESTS","maximum_block_size":131072,"hbd_interest_rate":1000}}]})~"
R"~({"trx_id":"47fae6df13c7117800ec407bafb1afc62f918cd3","block":3,"trx_in_block":0,"op_in_trx":0,"virtual_op":false,"timestamp":"2016-01-01T00:00:06","op":{"type":"pow2_operation","value":{"work":{"type":"pow2","value":{"input":{"worker_account":"dan0ah","prev_block":"000000024912184de38f50b4c83440750981ccbd","nonce":24},"pow_summary":4196506260}},"new_owner_key":"STM7YJmUoKbPQkrMrZbrgPxDMYJA3uD3utaN3WYRwaFGKYbQ9ftKV","props":{"account_creation_fee":{"amount":"0","precision":3,"nai":"@@000000021"},"maximum_block_size":131072,"hbd_interest_rate":1000}}},"operation_id":0})~",
R"~({"trx_id":"47fae6df13c7117800ec407bafb1afc62f918cd3","block":3,"trx_in_block":0,"op_in_trx":0,"virtual_op":false,"timestamp":"2016-01-01T00:00:06","op":["pow2",{"work":["pow2",{"input":{"worker_account":"dan0ah","prev_block":"000000024912184de38f50b4c83440750981ccbd","nonce":24},"pow_summary":4196506260}],"new_owner_key":"STM7YJmUoKbPQkrMrZbrgPxDMYJA3uD3utaN3WYRwaFGKYbQ9ftKV","props":{"account_creation_fee":"0.000 TESTS","maximum_block_size":131072,"hbd_interest_rate":1000}}]})~"
}, { // account_created_operation
R"~({"trx_id":"8315222e19ca72ee668672e6e8c53aa4a89ce42d","block":3,"trx_in_block":0,"op_in_trx":1,"virtual_op":true,"timestamp":"2016-01-01T00:00:06","op":{"type":"account_created_operation","value":{"new_account_name":"dan0ah","creator":"dan0ah","initial_vesting_shares":{"amount":"0","precision":6,"nai":"@@000000037"},"initial_delegation":{"amount":"0","precision":6,"nai":"@@000000037"}}},"operation_id":0})~",
R"~({"trx_id":"8315222e19ca72ee668672e6e8c53aa4a89ce42d","block":3,"trx_in_block":0,"op_in_trx":1,"virtual_op":true,"timestamp":"2016-01-01T00:00:06","op":["account_created",{"new_account_name":"dan0ah","creator":"dan0ah","initial_vesting_shares":"0.000000 VESTS","initial_delegation":"0.000000 VESTS"}]})~"
R"~({"trx_id":"47fae6df13c7117800ec407bafb1afc62f918cd3","block":3,"trx_in_block":0,"op_in_trx":1,"virtual_op":true,"timestamp":"2016-01-01T00:00:06","op":{"type":"account_created_operation","value":{"new_account_name":"dan0ah","creator":"dan0ah","initial_vesting_shares":{"amount":"0","precision":6,"nai":"@@000000037"},"initial_delegation":{"amount":"0","precision":6,"nai":"@@000000037"}}},"operation_id":0})~",
R"~({"trx_id":"47fae6df13c7117800ec407bafb1afc62f918cd3","block":3,"trx_in_block":0,"op_in_trx":1,"virtual_op":true,"timestamp":"2016-01-01T00:00:06","op":["account_created",{"new_account_name":"dan0ah","creator":"dan0ah","initial_vesting_shares":"0.000000 VESTS","initial_delegation":"0.000000 VESTS"}]})~"
}, { // pow_reward_operation
R"~({"trx_id":"8315222e19ca72ee668672e6e8c53aa4a89ce42d","block":3,"trx_in_block":0,"op_in_trx":2,"virtual_op":true,"timestamp":"2016-01-01T00:00:06","op":{"type":"pow_reward_operation","value":{"worker":"initminer","reward":{"amount":"1000000000000","precision":6,"nai":"@@000000037"}}},"operation_id":0})~",
R"~({"trx_id":"8315222e19ca72ee668672e6e8c53aa4a89ce42d","block":3,"trx_in_block":0,"op_in_trx":2,"virtual_op":true,"timestamp":"2016-01-01T00:00:06","op":["pow_reward",{"worker":"initminer","reward":"1000000.000000 VESTS"}]})~"
R"~({"trx_id":"47fae6df13c7117800ec407bafb1afc62f918cd3","block":3,"trx_in_block":0,"op_in_trx":2,"virtual_op":true,"timestamp":"2016-01-01T00:00:06","op":{"type":"pow_reward_operation","value":{"worker":"initminer","reward":{"amount":"1000000000000","precision":6,"nai":"@@000000037"}}},"operation_id":0})~",
R"~({"trx_id":"47fae6df13c7117800ec407bafb1afc62f918cd3","block":3,"trx_in_block":0,"op_in_trx":2,"virtual_op":true,"timestamp":"2016-01-01T00:00:06","op":["pow_reward",{"worker":"initminer","reward":"1000000.000000 VESTS"}]})~"
#else
R"~({"trx_id":"ff3ec48842cf338b6a5905e817daea3cd12b0dd4","block":3,"trx_in_block":0,"op_in_trx":0,"virtual_op":false,"timestamp":"2016-01-01T00:00:06","op":{"type":"pow2_operation","value":{"work":{"type":"pow2","value":{"input":{"worker_account":"dan0ah","prev_block":"00000002a8c7664246009c0f84f09687dfb9ec55","nonce":8},"pow_summary":4211230234}},"new_owner_key":"STM7YJmUoKbPQkrMrZbrgPxDMYJA3uD3utaN3WYRwaFGKYbQ9ftKV","props":{"account_creation_fee":{"amount":"0","precision":3,"nai":"@@000000021"},"maximum_block_size":131072,"hbd_interest_rate":1000}}},"operation_id":0})~",
R"~({"trx_id":"ff3ec48842cf338b6a5905e817daea3cd12b0dd4","block":3,"trx_in_block":0,"op_in_trx":0,"virtual_op":false,"timestamp":"2016-01-01T00:00:06","op":["pow2",{"work":["pow2",{"input":{"worker_account":"dan0ah","prev_block":"00000002a8c7664246009c0f84f09687dfb9ec55","nonce":8},"pow_summary":4211230234}],"new_owner_key":"STM7YJmUoKbPQkrMrZbrgPxDMYJA3uD3utaN3WYRwaFGKYbQ9ftKV","props":{"account_creation_fee":"0.000 TESTS","maximum_block_size":131072,"hbd_interest_rate":1000}}]})~"
Expand Down

0 comments on commit 9c4f655

Please sign in to comment.