Skip to content

Commit

Permalink
fix: duplicated code +
Browse files Browse the repository at this point in the history
  • Loading branch information
aoudiamoncef committed Nov 9, 2023
1 parent 57f4413 commit ab6fde4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 22 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@ massa_test_framework.egg-info
doc/_build

# IDE
.idea
.idea
.vscode

kubeconfig*

25 changes: 4 additions & 21 deletions massa_test_framework/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,11 +485,11 @@ def query_state(self, query_state_request: QueryStateRequest) -> QueryStateRespo
)
return query_state_response

def grpc_get_stakers(self) -> GetStakersResponse:
"""gRPC GetStakers.
def get_stakers_grpc(self) -> GetStakersResponse:
"""Queries the gRPC GetStakers method.
Example::
res = node.grpc_get_stakers()
Example:
res = node.get_stakers_grpc()
print(res.stakers)
"""
Expand All @@ -501,23 +501,6 @@ def grpc_get_stakers(self) -> GetStakersResponse:
)

return get_stakers_response

def grpc_get_status(self) -> GetStatusResponse:
"""gRPC GetStatus.
Example::
res = node.grpc_get_status()
print(res.status)
"""

get_status_response: GetStatusResponse = asyncio.run(
self._public_grpc_call(
self.grpc_host, self.pub_grpc_port, "get_status", GetStatusRequest()
)
)

return get_status_response

def wait_ready(self, timeout=20) -> None:
"""Wait for node to be ready
Expand Down

0 comments on commit ab6fde4

Please sign in to comment.