From 8cd6375a0fcc533c6e9ddca57ceb6aedaeeb34c9 Mon Sep 17 00:00:00 2001 From: Martin Lees <drov0@users.noreply.github.com> Date: Mon, 11 Sep 2023 23:25:31 -0400 Subject: [PATCH] fix broken mocks + removed debug log --- hive/db/sql_scripts/hive_post_operations.sql | 3 -- mock_data/block_data/notify_op/flow.txt | 11 ++++++ mock_data/block_data/payments_op/flow.txt | 10 +++++ .../vops_data/mock_vops_data_example_001.json | 38 +++++++++++-------- 4 files changed, 43 insertions(+), 19 deletions(-) diff --git a/hive/db/sql_scripts/hive_post_operations.sql b/hive/db/sql_scripts/hive_post_operations.sql index 5edfdc91a..cddd5607a 100644 --- a/hive/db/sql_scripts/hive_post_operations.sql +++ b/hive/db/sql_scripts/hive_post_operations.sql @@ -42,9 +42,6 @@ declare __is_muted bool := TRUE; __community_id hivemind_app.hive_posts.community_id%TYPE; BEGIN - - RAISE NOTICE 'Function parameters: _block_num: %, _community_support_start_block: %, _parent_permlink: %, _author_id: %, is_comment: %', _block_num, _community_support_start_block, _parent_permlink, _author_id, is_comment; - IF _block_num < _community_support_start_block THEN __is_muted := FALSE; __community_id := NULL; diff --git a/mock_data/block_data/notify_op/flow.txt b/mock_data/block_data/notify_op/flow.txt index e69de29bb..670b7d9c7 100644 --- a/mock_data/block_data/notify_op/flow.txt +++ b/mock_data/block_data/notify_op/flow.txt @@ -0,0 +1,11 @@ +***block 1000000*** +custom_json_operation("[\"setLastRead\", {\"date\": \"2021-05-26T14:21:43\"}]") +custom_json_operation("[\"setLastRead\", {\"date\": null}]") +custom_json_operation("[\"setLastRead\", {}]") +custom_json_operation("[\"setLastRead\", {\"date\": \"2016-05-26T14:21:43\"}]") +custom_json_operation("[\"setLastRead\", {\"date\": \"2099-02-26T14:21:43\"}]") +custom_json_operation("[\"setLastRead\", {\"date\": null}]") +custom_json_operation("[\"setLastRead\"]") +custom_json_operation("[\"setLastRead\", {\"date\": \"2015-02-26T14:21:43\"}]") +custom_json_operation("[\"setLastRead\", {\"date\": \"1968-02-26T14:21:43\"}]") +custom_json_operation("[\"setLastRead\", {}]") \ No newline at end of file diff --git a/mock_data/block_data/payments_op/flow.txt b/mock_data/block_data/payments_op/flow.txt index e69de29bb..f4bd9e81b 100644 --- a/mock_data/block_data/payments_op/flow.txt +++ b/mock_data/block_data/payments_op/flow.txt @@ -0,0 +1,10 @@ +***block 4000001*** +transfer_operation( `gtg`, `null`, `0.02 HBD`, `@alice/firstpost______20` ) +***block 4010001*** +comment_operation( ``, `alice`,`firstpost______20`) +delete_comment_operation( `alice`, `firstpost______20`) +transfer_operation( `gtg`, `null`, `0.02 HBD`, `@alice/firstpost______20` ) +***block 4020001*** +transfer_operation( `gtg`, `null`, `0.02 HBD`, `@alice/firstpost______20` ) +comment_operation( ``, `alice`,`firstpost______20`) +transfer_operation( `gtg`, `null`, `0.02 HBD`, `@alice/firstpost______20` ) \ No newline at end of file diff --git a/mock_data/examples/vops_data/mock_vops_data_example_001.json b/mock_data/examples/vops_data/mock_vops_data_example_001.json index adeaedc42..a786be28e 100644 --- a/mock_data/examples/vops_data/mock_vops_data_example_001.json +++ b/mock_data/examples/vops_data/mock_vops_data_example_001.json @@ -1,13 +1,7 @@ { - "ops": [ - { - "trx_id": "0000000000000000000000000000000000000000", - "block": 300, - "trx_in_block": 4294967295, - "op_in_trx": 0, - "virtual_op": 1, - "timestamp": "2016-03-24T16:20:30", - "op": { + "300": { + "virtual_operations": [ + { "type": "producer_reward_operation", "value": { "producer": "tester1", @@ -18,10 +12,22 @@ } } }, - "operation_id": "9223372039063639274" - } - ], - "ops_by_block": [], - "next_block_range_begin": 10977, - "next_operation_begin": 0 -} \ No newline at end of file + { + "type": "effective_comment_vote_operation", + "value": { + "voter": "ignoreall", + "author": "agartha", + "permlink": "regular-post", + "weight": 200, + "rshares": 20000000, + "total_vote_weight": 200, + "pending_payout": { + "amount": "2", + "precision": 3, + "nai": "@@000000013" + } + } + } + ] + } +} -- GitLab