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

Fix off by one error in parachain display #368

Merged
merged 1 commit into from
Sep 8, 2022

Conversation

atomaka
Copy link
Contributor

@atomaka atomaka commented Sep 8, 2022

A word of caution: I don't know enough about the table display library to know if this is the right fix, but I'd rather submit a pull request than an issue!

I'm experiencing an off-by-one error in the display output for parachain information. Running a basic config (truncated for brevity, full config file at https://gist.github.com/atomaka/1696faaec51e74878037837914e8c2d3):

provider = "native"

[relaychain]
  [[relaychain.nodes]]
  name = "alice"

  [[relaychain.nodes]]
  name = "bob"

[[parachains]]
id = 2114

  [parachains.collator]
  name = "collator2114"

[[parachains]]
id = 1999

  [parachains.collator]
  name = "collator1999"

My parachain information gets displayed incorrectly. The network information for parachain 1999 is displayed under the second relay node (bob) and the network information for parachain 2114 is displayed under 1999. 2114 does not have the information. Example output:

Screen Shot 2022-09-08 at 12 15 35

This commit changes ordering in the parachain display information loop and seems to resolve the issue.

@wirednkod
Copy link
Contributor

Thank you @atomaka
As far as I know, the table is not meant to show "one under the other" correlation. Is just info concerning each node.

cc @pepoviola

@atomaka
Copy link
Contributor Author

atomaka commented Sep 8, 2022

Thank you @atomaka As far as I know, the table is not meant to show "one under the other" correlation. Is just info concerning each node.

cc @pepoviola

Maybe I didn't represent the issue clearly. The image should show it well though. The "Parachain ID" and "Chainspec Path" fields are placed under the incorrect node.

@wirednkod
Copy link
Contributor

Thank you @atomaka As far as I know, the table is not meant to show "one under the other" correlation. Is just info concerning each node.

cc @pepoviola

Maybe I didn't represent the issue clearly. The image should show it well though. The "Parachain ID" and "Chainspec Path" fields are placed in the incorrect table.

Apologies. Understood the issue now. Thank you for that

@pepoviola
Copy link
Collaborator

Looks good @atomaka! Thanks for the fix!

@pepoviola pepoviola merged commit 4a405e3 into paritytech:main Sep 8, 2022
@atomaka atomaka deleted the para-off-by-one branch September 8, 2022 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants