Skip to content

feat(cmd/network/status): Add network names to chain context #424

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

Merged
merged 1 commit into from
Apr 11, 2025

Conversation

amela
Copy link
Member

@amela amela commented Apr 10, 2025

No description provided.

@amela amela linked an issue Apr 10, 2025 that may be closed by this pull request
Copy link

netlify bot commented Apr 10, 2025

Deploy Preview for oasisprotocol-cli canceled.

Name Link
🔨 Latest commit 3e6f22e
🔍 Latest deploy log https://app.netlify.com/sites/oasisprotocol-cli/deploys/67f8c7c191703c0008b8994a

@amela amela force-pushed the amela/feat/chain-context branch from 4f7c836 to 6987bb8 Compare April 10, 2025 08:03
@amela amela requested a review from matevz April 10, 2025 08:06
@@ -75,7 +75,7 @@ var statusCmd = &cobra.Command{
fmt.Printf("Version: %s", consensus.Version.String())
fmt.Println()

fmt.Printf("Chain context: %s", consensus.ChainContext)
fmt.Printf("Chain context: %s (%s)", npa.PrettyPrintNetwork(), consensus.ChainContext)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually the idea of the issue was to lookup the network name based on the chain context here: https://github.com/oasisprotocol/oasis-sdk/blob/main/client-sdk/go/config/default.go

So if you're running a node locally and you name the network localhost, it should still print mainnet, if it's running on mainnet.

Copy link
Member

@matevz matevz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, wrong button. Please properly resolve the comment ^^

@amela amela force-pushed the amela/feat/chain-context branch from 6987bb8 to 3e6f22e Compare April 11, 2025 07:41
@amela amela requested a review from matevz April 11, 2025 07:43
@amela amela merged commit c6de32e into master Apr 11, 2025
4 checks passed
@amela amela deleted the amela/feat/chain-context branch April 11, 2025 10:50
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.

network status: Add mainnet and testnet names to chain contexts
2 participants