Skip to content

Commit

Permalink
Merge pull request #398 from mkoura/cardano_mode_default
Browse files Browse the repository at this point in the history
Make cardano mode default
  • Loading branch information
mkoura committed Feb 26, 2021
2 parents 52d9f23 + 6fa5b86 commit b3212e3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 7 additions & 1 deletion cardano_node_tests/utils/cluster_nodes.py
Expand Up @@ -75,7 +75,13 @@ def __init__(self) -> None:

def get_cluster_obj(self) -> clusterlib.ClusterLib:
"""Return instance of `ClusterLib` (cluster_obj)."""
cluster_obj = clusterlib.ClusterLib(get_cluster_env().state_dir)
cluster_env = get_cluster_env()
cluster_obj = clusterlib.ClusterLib(
state_dir=cluster_env.state_dir,
protocol=clusterlib.Protocols.SHELLEY,
era=cluster_env.cluster_era,
tx_era=cluster_env.tx_era,
)
return cluster_obj

def create_addrs_data(
Expand Down
5 changes: 4 additions & 1 deletion cardano_node_tests/utils/clusterlib.py
Expand Up @@ -179,7 +179,7 @@ class ClusterLib:
def __init__(
self,
state_dir: FileType,
protocol: str = Protocols.SHELLEY,
protocol: str = Protocols.CARDANO,
era: str = "",
tx_era: str = "",
slots_offset: int = 0,
Expand Down Expand Up @@ -1981,3 +1981,6 @@ def create_stake_pool(
tx_raw_output=tx_raw_output,
kes_key_pair=node_kes,
)

def __repr__(self) -> str:
return f"<ClusterLib: protocol={self.protocol}, era={self.era}, tx_era={self.tx_era}>"

0 comments on commit b3212e3

Please sign in to comment.