Skip to content

Commit e3757ee

Browse files
authored
Merge pull request #332 from input-output-hk/get_ledget_peer_snapshot
Include get_ledger_peer_snapshot
2 parents 6fc3c30 + 5e829fe commit e3757ee

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cardano_clusterlib/query_group.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,5 +739,10 @@ def get_stake_pool_default_vote(
739739
raw_output: str = self.query_cli(["stake-pool-default-vote", *cred_args]).strip().strip('"')
740740
return raw_output
741741

742+
def get_ledger_peer_snapshot(self) -> dict[str, tp.Any]:
743+
"""Get the current snapshot of ledger peers."""
744+
out: dict[str, tp.Any] = json.loads(self.query_cli(["ledger-peer-snapshot"])) or {}
745+
return out
746+
742747
def __repr__(self) -> str:
743748
return f"<{self.__class__.__name__}: clusterlib_obj={id(self._clusterlib_obj)}>"

0 commit comments

Comments
 (0)