From c847fcc222caf51acf85ca3b8ae5f790ae02c330 Mon Sep 17 00:00:00 2001 From: Roman Date: Thu, 10 Apr 2025 15:13:29 +0800 Subject: [PATCH] fix: get_storage_block --- src/api_clients/rest.py | 2 +- src/steps/storage.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/api_clients/rest.py b/src/api_clients/rest.py index 506dd0c..c231def 100644 --- a/src/api_clients/rest.py +++ b/src/api_clients/rest.py @@ -75,7 +75,7 @@ class REST(BaseClient): return response.json() def storage_block(self, query): - response = self.rest_call("get", "storage/block", json.dumps(query)) + response = self.rest_call("post", f"storage/block", json.dumps(query)) return response.json() def mempool_add_tx(self, data): diff --git a/src/steps/storage.py b/src/steps/storage.py index 879595e..bf81580 100644 --- a/src/steps/storage.py +++ b/src/steps/storage.py @@ -1,3 +1,5 @@ +from urllib.parse import quote + import allure from tenacity import retry, stop_after_delay, wait_fixed @@ -8,7 +10,7 @@ logger = get_custom_logger(__name__) def prepare_get_storage_block_request(header_id): - query_data = {"header_id": header_id} + query_data = f"{header_id}" return query_data