diff --git a/massa_test_framework/massa_jsonrpc_api/api.py b/massa_test_framework/massa_jsonrpc_api/api.py index e9f7200..df9ab5b 100644 --- a/massa_test_framework/massa_jsonrpc_api/api.py +++ b/massa_test_framework/massa_jsonrpc_api/api.py @@ -113,6 +113,19 @@ def get_stakers(): ) return headers, payload + @staticmethod + def get_blockclique_block_by_slot(period: int, thread: int): + headers = {"Content-type": "application/json"} + payload = json.dumps( + { + "jsonrpc": "2.0", + "method": "get_blockclique_block_by_slot", + "id": 0, + "params": [{"period": period, "thread": thread}], + } + ) + return headers, payload + # class Api: # def __init__(self, url) -> None: diff --git a/massa_test_framework/node.py b/massa_test_framework/node.py index 56d38a1..21b4c9d 100644 --- a/massa_test_framework/node.py +++ b/massa_test_framework/node.py @@ -422,6 +422,11 @@ def get_stakers(self): print("get_stakers", res, type(res)) return res + def get_blockclique_block_by_slot(self, period: int, thread: int): + res = self.pub_api2.get_blockclique_block_by_slot(period, thread) + print("get_blockclique_block_by_slot", res, type(res)) + return res + # API GRPC async def _public_grpc_call(