Skip to content
Snippets Groups Projects
Commit 55b95272 authored by Maciej Krzeminski's avatar Maciej Krzeminski Committed by Bartek Wrona
Browse files

Keyauth: Add subquery in place of is_keyauths_operation

parent 7271ace0
No related branches found
No related tags found
6 merge requests!627merge in fix for get_current_block_age,!626Fix get_current_block_age function to avoid healthcheck fails,!622merge develop to master,!599merge ( with merge commit) develop to master,!597Merge develop to master for release,!344Fix keyauth state provider
......@@ -690,7 +690,21 @@ Datum set_to_string_array_datum(const std::set<std::string>& key_auth)
** SELECT (hive.get_keyauths( ov.body )).*
** FROM hive.%s_operations_view ov
** WHERE
** hive.is_keyauths_operation(ov.body)
** ov.op_type_id in
** (
** SELECT id FROM hive.operation_types WHERE name IN
** (
** ''hive::protocol::account_create_operation'',
** ''hive::protocol::account_create_with_delegation_operation'',
** ''hive::protocol::account_update_operation'',
** ''hive::protocol::account_update2_operation'',
** ''hive::protocol::create_claimed_account_operation'',
** ''hive::protocol::recover_account_operation'',
** ''hive::protocol::request_account_recovery_operation'',
** ''hive::protocol::reset_account_operation'',
** ''hive::protocol::witness_set_properties_operation''
** )
** )
** AND
** ov.block_num BETWEEN %s AND %s
** ON CONFLICT DO NOTHING'
......@@ -809,7 +823,21 @@ Datum set_to_string_array_datum(const std::set<std::string>& key_auth)
** SELECT (hive.get_keyauths( ov.body )).*
** FROM hive.%s_operations_view ov
** WHERE
** hive.is_keyauths_operation(ov.body)
** ov.op_type_id in
** (
** SELECT id FROM hive.operation_types WHERE name IN
** (
** ''hive::protocol::account_create_operation'',
** ''hive::protocol::account_create_with_delegation_operation'',
** ''hive::protocol::account_update_operation'',
** ''hive::protocol::account_update2_operation'',
** ''hive::protocol::create_claimed_account_operation'',
** ''hive::protocol::recover_account_operation'',
** ''hive::protocol::request_account_recovery_operation'',
** ''hive::protocol::reset_account_operation'',
** ''hive::protocol::witness_set_properties_operation''
** )
** )
** AND
** ov.block_num BETWEEN %s AND %s
** ON CONFLICT DO NOTHING'
......
......@@ -94,7 +94,21 @@ BEGIN
SELECT (hive.get_keyauths( ov.body_binary )).* , id, block_num, timestamp
FROM hive.%s_operations_view ov
WHERE
hive.is_keyauths_operation(ov.body_binary)
ov.op_type_id in
(
SELECT id FROM hive.operation_types WHERE name IN
(
''hive::protocol::account_create_operation'',
''hive::protocol::account_create_with_delegation_operation'',
''hive::protocol::account_update_operation'',
''hive::protocol::account_update2_operation'',
''hive::protocol::create_claimed_account_operation'',
''hive::protocol::recover_account_operation'',
''hive::protocol::request_account_recovery_operation'',
''hive::protocol::reset_account_operation'',
''hive::protocol::witness_set_properties_operation''
)
)
AND
ov.block_num BETWEEN %s AND %s
ON CONFLICT DO NOTHING'
......@@ -106,7 +120,21 @@ BEGIN
SELECT (hive.get_keyauths( ov.body_binary )).* , id, block_num, timestamp
FROM hive.%s_operations_view ov
WHERE
hive.is_keyauths_operation(ov.body_binary)
ov.op_type_id in
(
SELECT id FROM hive.operation_types WHERE name IN
(
''hive::protocol::account_create_operation'',
''hive::protocol::account_create_with_delegation_operation'',
''hive::protocol::account_update_operation'',
''hive::protocol::account_update2_operation'',
''hive::protocol::create_claimed_account_operation'',
''hive::protocol::recover_account_operation'',
''hive::protocol::request_account_recovery_operation'',
''hive::protocol::reset_account_operation'',
''hive::protocol::witness_set_properties_operation''
)
)
AND
ov.block_num BETWEEN %s AND %s
ON CONFLICT DO NOTHING'
......
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