Revert changes abi processing.

pull/477/head
Andrey Dolgolev 2021-12-16 17:15:23 +02:00
rodzic 741ee9f3fa
commit 4d4032e274
1 zmienionych plików z 15 dodań i 4 usunięć

Wyświetl plik

@ -457,15 +457,22 @@ def get_blocks_state(
return blocks_state return blocks_state
def generate_list_of_names(type: str, subscription_filters: Dict[str, Any]): def generate_list_of_names(
type: str, subscription_filters: Dict[str, Any], read_abi: bool, abi_json: Any
):
""" """
Generate list of names for select from database by name field Generate list of names for select from database by name field
""" """
names = [ if read_abi:
item["name"] for item in subscription_filters[abi_type_to_dashboards_type[type]] names = [item["name"] for item in abi_json if item["type"] == type]
] else:
names = [
item["name"]
for item in subscription_filters[abi_type_to_dashboards_type[type]]
]
return names return names
@ -652,11 +659,15 @@ def stats_generate_handler(args: argparse.Namespace):
methods = generate_list_of_names( methods = generate_list_of_names(
type="function", type="function",
subscription_filters=dashboard_subscription_filters, subscription_filters=dashboard_subscription_filters,
read_abi=dashboard_subscription_filters["all_methods"],
abi_json=abi_json,
) )
events = generate_list_of_names( events = generate_list_of_names(
type="event", type="event",
subscription_filters=dashboard_subscription_filters, subscription_filters=dashboard_subscription_filters,
read_abi=dashboard_subscription_filters["all_events"],
abi_json=abi_json,
) )
abi_external_calls = [ abi_external_calls = [