Skip to content

Commit dfaad7f

Browse files
committed
Updated patterns in condenser_api get_ops_in_block unit tests
1 parent d09686c commit dfaad7f

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

tests/unit/plugin_tests/condenser_api_ops_in_block_tests.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,14 @@ BOOST_AUTO_TEST_CASE( get_ops_in_block_hf12 )
188188
R"~({"trx_id":"3641a2d95c30fb4805dee279399788add889657a","block":3,"trx_in_block":0,"op_in_trx":2,"virtual_op":true,"timestamp":"2016-01-01T00:00:09","op":{"type":"pow_reward_operation","value":{"worker":"initminer","reward":{"amount":"21000","precision":3,"nai":"@@000000021"}}},"operation_id":0})~",
189189
R"~({"trx_id":"3641a2d95c30fb4805dee279399788add889657a","block":3,"trx_in_block":0,"op_in_trx":2,"virtual_op":true,"timestamp":"2016-01-01T00:00:09","op":["pow_reward",{"worker":"initminer","reward":"21.000 TESTS"}]})~"
190190
#else
191-
R"~({"trx_id":"70cd2d23ff4c590cd4bc8361cf4e93373fbd9935","block":3,"trx_in_block":0,"op_in_trx":0,"virtual_op":false,"timestamp":"2016-01-01T00:00:09","op":{"type":"pow_operation","value":{"worker_account":"carol0ah","block_id":"000000029182c87b08eb70059f4bdc22352cbfdb","nonce":40,"work":{"worker":"STM5Mwq5o6BruTVbCcxkqVKL4eeRm3Jrs5fjRGHshvGUj29FPh7Yr","input":"4e4ee151ae1b5317e0fa9835b308163b5fce6ba4b836ecd7dac90acbae5d477a","signature":"208e93e1810b5716c9725fb7e487c271d1eb7bd5674cc5bfb79c01a52b581b269777195d5e3d59750cdf3c10353d77373bfcf6393541cfa1411aa196097cdf90ed","work":"000bae328972f541f9fb4b8a07c52fe15005117434c597c7b37e320397036586"},"props":{"account_creation_fee":{"amount":"0","precision":3,"nai":"@@000000021"},"maximum_block_size":131072,"hbd_interest_rate":1000}}},"operation_id":0})~",
192-
R"~({"trx_id":"70cd2d23ff4c590cd4bc8361cf4e93373fbd9935","block":3,"trx_in_block":0,"op_in_trx":0,"virtual_op":false,"timestamp":"2016-01-01T00:00:09","op":["pow",{"worker_account":"carol0ah","block_id":"000000029182c87b08eb70059f4bdc22352cbfdb","nonce":40,"work":{"worker":"STM5Mwq5o6BruTVbCcxkqVKL4eeRm3Jrs5fjRGHshvGUj29FPh7Yr","input":"4e4ee151ae1b5317e0fa9835b308163b5fce6ba4b836ecd7dac90acbae5d477a","signature":"208e93e1810b5716c9725fb7e487c271d1eb7bd5674cc5bfb79c01a52b581b269777195d5e3d59750cdf3c10353d77373bfcf6393541cfa1411aa196097cdf90ed","work":"000bae328972f541f9fb4b8a07c52fe15005117434c597c7b37e320397036586"},"props":{"account_creation_fee":"0.000 TESTS","maximum_block_size":131072,"hbd_interest_rate":1000}}]})~"
191+
R"~({"trx_id":"84b9d6aee20c2834316f7a019da86acd30987009","block":3,"trx_in_block":0,"op_in_trx":0,"virtual_op":false,"timestamp":"2016-01-01T00:00:09","op":{"type":"pow_operation","value":{"worker_account":"carol0ah","block_id":"0000000253411bd710f5f86b5098481bfa8c69c1","nonce":66,"work":{"worker":"STM5Mwq5o6BruTVbCcxkqVKL4eeRm3Jrs5fjRGHshvGUj29FPh7Yr","input":"6e3c30b1d612f81fbfeb09fb01baaeb1edee47a75019d35ae670026780d10a89","signature":"1f46520bc7ba9e6d1faebb0f5f7694e234982fc60b587e83715fdf15d15d39423861a02a263c3ce48b84b76880f45c7392bf5e3cd2f5a5b2636ed5f9ffc7ab471e","work":"0784d83930002c366471aedb3cd6d85b2e3277a449a505cf5990847c0679f24c"},"props":{"account_creation_fee":{"amount":"0","precision":3,"nai":"@@000000021"},"maximum_block_size":131072,"hbd_interest_rate":1000}}},"operation_id":0})~",
192+
R"~({"trx_id":"84b9d6aee20c2834316f7a019da86acd30987009","block":3,"trx_in_block":0,"op_in_trx":0,"virtual_op":false,"timestamp":"2016-01-01T00:00:09","op":["pow",{"worker_account":"carol0ah","block_id":"0000000253411bd710f5f86b5098481bfa8c69c1","nonce":66,"work":{"worker":"STM5Mwq5o6BruTVbCcxkqVKL4eeRm3Jrs5fjRGHshvGUj29FPh7Yr","input":"6e3c30b1d612f81fbfeb09fb01baaeb1edee47a75019d35ae670026780d10a89","signature":"1f46520bc7ba9e6d1faebb0f5f7694e234982fc60b587e83715fdf15d15d39423861a02a263c3ce48b84b76880f45c7392bf5e3cd2f5a5b2636ed5f9ffc7ab471e","work":"0784d83930002c366471aedb3cd6d85b2e3277a449a505cf5990847c0679f24c"},"props":{"account_creation_fee":"0.000 TESTS","maximum_block_size":131072,"hbd_interest_rate":1000}}]})~"
193193
}, { // account_created_operation
194-
R"~({"trx_id":"70cd2d23ff4c590cd4bc8361cf4e93373fbd9935","block":3,"trx_in_block":0,"op_in_trx":1,"virtual_op":true,"timestamp":"2016-01-01T00:00:09","op":{"type":"account_created_operation","value":{"new_account_name":"carol0ah","creator":"carol0ah","initial_vesting_shares":{"amount":"0","precision":6,"nai":"@@000000037"},"initial_delegation":{"amount":"0","precision":6,"nai":"@@000000037"}}},"operation_id":0})~",
195-
R"~({"trx_id":"70cd2d23ff4c590cd4bc8361cf4e93373fbd9935","block":3,"trx_in_block":0,"op_in_trx":1,"virtual_op":true,"timestamp":"2016-01-01T00:00:09","op":["account_created",{"new_account_name":"carol0ah","creator":"carol0ah","initial_vesting_shares":"0.000000 VESTS","initial_delegation":"0.000000 VESTS"}]})~"
194+
R"~({"trx_id":"84b9d6aee20c2834316f7a019da86acd30987009","block":3,"trx_in_block":0,"op_in_trx":1,"virtual_op":true,"timestamp":"2016-01-01T00:00:09","op":{"type":"account_created_operation","value":{"new_account_name":"carol0ah","creator":"carol0ah","initial_vesting_shares":{"amount":"0","precision":6,"nai":"@@000000037"},"initial_delegation":{"amount":"0","precision":6,"nai":"@@000000037"}}},"operation_id":0})~",
195+
R"~({"trx_id":"84b9d6aee20c2834316f7a019da86acd30987009","block":3,"trx_in_block":0,"op_in_trx":1,"virtual_op":true,"timestamp":"2016-01-01T00:00:09","op":["account_created",{"new_account_name":"carol0ah","creator":"carol0ah","initial_vesting_shares":"0.000000 VESTS","initial_delegation":"0.000000 VESTS"}]})~"
196196
}, { // pow_reward_operation / direct result of pow_operation
197-
R"~({"trx_id":"70cd2d23ff4c590cd4bc8361cf4e93373fbd9935","block":3,"trx_in_block":0,"op_in_trx":2,"virtual_op":true,"timestamp":"2016-01-01T00:00:09","op":{"type":"pow_reward_operation","value":{"worker":"initminer","reward":{"amount":"21000","precision":3,"nai":"@@000000021"}}},"operation_id":0})~",
198-
R"~({"trx_id":"70cd2d23ff4c590cd4bc8361cf4e93373fbd9935","block":3,"trx_in_block":0,"op_in_trx":2,"virtual_op":true,"timestamp":"2016-01-01T00:00:09","op":["pow_reward",{"worker":"initminer","reward":"21.000 TESTS"}]})~"
197+
R"~({"trx_id":"84b9d6aee20c2834316f7a019da86acd30987009","block":3,"trx_in_block":0,"op_in_trx":2,"virtual_op":true,"timestamp":"2016-01-01T00:00:09","op":{"type":"pow_reward_operation","value":{"worker":"initminer","reward":{"amount":"21000","precision":3,"nai":"@@000000021"}}},"operation_id":0})~",
198+
R"~({"trx_id":"84b9d6aee20c2834316f7a019da86acd30987009","block":3,"trx_in_block":0,"op_in_trx":2,"virtual_op":true,"timestamp":"2016-01-01T00:00:09","op":["pow_reward",{"worker":"initminer","reward":"21.000 TESTS"}]})~"
199199
#endif
200200
}, { // producer_reward_operation
201201
R"~({"trx_id":"0000000000000000000000000000000000000000","block":3,"trx_in_block":4294967295,"op_in_trx":1,"virtual_op":true,"timestamp":"2016-01-01T00:00:09","op":{"type":"producer_reward_operation","value":{"producer":"initminer","vesting_shares":{"amount":"1000","precision":3,"nai":"@@000000021"}}},"operation_id":0})~",
@@ -230,14 +230,14 @@ BOOST_AUTO_TEST_CASE( get_ops_in_block_hf13 )
230230
R"~({"trx_id":"47fae6df13c7117800ec407bafb1afc62f918cd3","block":3,"trx_in_block":0,"op_in_trx":2,"virtual_op":true,"timestamp":"2016-01-01T00:00:09","op":{"type":"pow_reward_operation","value":{"worker":"initminer","reward":{"amount":"1000000000000","precision":6,"nai":"@@000000037"}}},"operation_id":0})~",
231231
R"~({"trx_id":"47fae6df13c7117800ec407bafb1afc62f918cd3","block":3,"trx_in_block":0,"op_in_trx":2,"virtual_op":true,"timestamp":"2016-01-01T00:00:09","op":["pow_reward",{"worker":"initminer","reward":"1000000.000000 VESTS"}]})~"
232232
#else
233-
R"~({"trx_id":"ff3ec48842cf338b6a5905e817daea3cd12b0dd4","block":3,"trx_in_block":0,"op_in_trx":0,"virtual_op":false,"timestamp":"2016-01-01T00:00:09","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})~",
234-
R"~({"trx_id":"ff3ec48842cf338b6a5905e817daea3cd12b0dd4","block":3,"trx_in_block":0,"op_in_trx":0,"virtual_op":false,"timestamp":"2016-01-01T00:00:09","op":["pow2",{"work":[0,{"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}}]})~"
233+
R"~({"trx_id":"daf744e3955de254685b4fc68a266b0044577830","block":3,"trx_in_block":0,"op_in_trx":0,"virtual_op":false,"timestamp":"2016-01-01T00:00:09","op":{"type":"pow2_operation","value":{"work":{"type":"pow2","value":{"input":{"worker_account":"dan0ah","prev_block":"00000002a4509aa12432af955caa0df700ab9314","nonce":21},"pow_summary":4200098166}},"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})~",
234+
R"~({"trx_id":"daf744e3955de254685b4fc68a266b0044577830","block":3,"trx_in_block":0,"op_in_trx":0,"virtual_op":false,"timestamp":"2016-01-01T00:00:09","op":["pow2",{"work":[0,{"input":{"worker_account":"dan0ah","prev_block":"00000002a4509aa12432af955caa0df700ab9314","nonce":21},"pow_summary":4200098166}],"new_owner_key":"STM7YJmUoKbPQkrMrZbrgPxDMYJA3uD3utaN3WYRwaFGKYbQ9ftKV","props":{"account_creation_fee":"0.000 TESTS","maximum_block_size":131072,"hbd_interest_rate":1000}}]})~"
235235
}, { // account_created_operation
236-
R"~({"trx_id":"ff3ec48842cf338b6a5905e817daea3cd12b0dd4","block":3,"trx_in_block":0,"op_in_trx":1,"virtual_op":true,"timestamp":"2016-01-01T00:00:09","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})~",
237-
R"~({"trx_id":"ff3ec48842cf338b6a5905e817daea3cd12b0dd4","block":3,"trx_in_block":0,"op_in_trx":1,"virtual_op":true,"timestamp":"2016-01-01T00:00:09","op":["account_created",{"new_account_name":"dan0ah","creator":"dan0ah","initial_vesting_shares":"0.000000 VESTS","initial_delegation":"0.000000 VESTS"}]})~"
236+
R"~({"trx_id":"daf744e3955de254685b4fc68a266b0044577830","block":3,"trx_in_block":0,"op_in_trx":1,"virtual_op":true,"timestamp":"2016-01-01T00:00:09","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})~",
237+
R"~({"trx_id":"daf744e3955de254685b4fc68a266b0044577830","block":3,"trx_in_block":0,"op_in_trx":1,"virtual_op":true,"timestamp":"2016-01-01T00:00:09","op":["account_created",{"new_account_name":"dan0ah","creator":"dan0ah","initial_vesting_shares":"0.000000 VESTS","initial_delegation":"0.000000 VESTS"}]})~"
238238
}, { // pow_reward_operation
239-
R"~({"trx_id":"ff3ec48842cf338b6a5905e817daea3cd12b0dd4","block":3,"trx_in_block":0,"op_in_trx":2,"virtual_op":true,"timestamp":"2016-01-01T00:00:09","op":{"type":"pow_reward_operation","value":{"worker":"initminer","reward":{"amount":"1000000000000","precision":6,"nai":"@@000000037"}}},"operation_id":0})~",
240-
R"~({"trx_id":"ff3ec48842cf338b6a5905e817daea3cd12b0dd4","block":3,"trx_in_block":0,"op_in_trx":2,"virtual_op":true,"timestamp":"2016-01-01T00:00:09","op":["pow_reward",{"worker":"initminer","reward":"1000000.000000 VESTS"}]})~"
239+
R"~({"trx_id":"daf744e3955de254685b4fc68a266b0044577830","block":3,"trx_in_block":0,"op_in_trx":2,"virtual_op":true,"timestamp":"2016-01-01T00:00:09","op":{"type":"pow_reward_operation","value":{"worker":"initminer","reward":{"amount":"1000000000000","precision":6,"nai":"@@000000037"}}},"operation_id":0})~",
240+
R"~({"trx_id":"daf744e3955de254685b4fc68a266b0044577830","block":3,"trx_in_block":0,"op_in_trx":2,"virtual_op":true,"timestamp":"2016-01-01T00:00:09","op":["pow_reward",{"worker":"initminer","reward":"1000000.000000 VESTS"}]})~"
241241
#endif
242242
}, { // account_create_with_delegation_operation / second obsolete operation tested here.
243243
R"~({"trx_id":"14509bc4811afed8b9d5a277ca17223d3e9f8c87","block":3,"trx_in_block":1,"op_in_trx":0,"virtual_op":false,"timestamp":"2016-01-01T00:00:09","op":{"type":"account_create_with_delegation_operation","value":{"fee":{"amount":"0","precision":3,"nai":"@@000000021"},"delegation":{"amount":"100000000000000","precision":6,"nai":"@@000000037"},"creator":"initminer","new_account_name":"edgar0ah","owner":{"weight_threshold":1,"account_auths":[],"key_auths":[["STM8R8maxJxeBMR3JYmap1n3Pypm886oEUjLYdsetzcnPDFpiq3pZ",1]]},"active":{"weight_threshold":1,"account_auths":[],"key_auths":[["STM8R8maxJxeBMR3JYmap1n3Pypm886oEUjLYdsetzcnPDFpiq3pZ",1]]},"posting":{"weight_threshold":1,"account_auths":[],"key_auths":[["STM8ZCsvwKqttXivgPyJ1MYS4q1r3fBZJh3g1SaBxVbfsqNcmnvD3",1]]},"memo_key":"STM8ZCsvwKqttXivgPyJ1MYS4q1r3fBZJh3g1SaBxVbfsqNcmnvD3","json_metadata":"","extensions":[]}},"operation_id":0})~",

0 commit comments

Comments
 (0)