Skip to content

Commit

Permalink
add get_blockclique_block_by_slot api call support
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-François <[email protected]>
  • Loading branch information
bilboquet committed Dec 19, 2024
1 parent 9d80e96 commit 71208fe
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
13 changes: 13 additions & 0 deletions massa_test_framework/massa_jsonrpc_api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions massa_test_framework/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 71208fe

Please sign in to comment.