Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: cmd flag don't support multiple chains #141

Merged
merged 5 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
- [#129](https://github.com/crypto-com/pystarport/pull/129) create and get validator are incompatible.
- [#137](https://github.com/crypto-com/pystarport/pull/137) support ica and icaauth cmd.
- [#139](https://github.com/crypto-com/pystarport/pull/139) support ibc channel upgrade related methods.
- [#141](https://github.com/crypto-com/pystarport/pull/141) make cmd flag support multiple chains.

*Feb 7, 2023*

Expand Down
9 changes: 8 additions & 1 deletion pystarport/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -1239,7 +1239,14 @@ def init_cluster(
cfg["chain_id"] = chain_id

chains = list(config.values())
for chain in chains:

# for multiple chains, there can be multiple cmds splited by `,`
if cmd is not None:
cmds = cmd.split(",")
else:
cmds = [None] * len(chains)

for chain, cmd in zip(chains, cmds):
(data_dir / chain["chain_id"]).mkdir()
init_devnet(
data_dir / chain["chain_id"], chain, base_port, image, cmd, gen_compose_file
Expand Down
Loading