Skip to content

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

Merged
amela merged 1 commit intomasterfrom
amela/feat/chain-context
Apr 11, 2025
Merged

feat(cmd/network/status): Add network names to chain context#424
amela merged 1 commit intomasterfrom
amela/feat/chain-context

Conversation

@amela
Copy link
Copy Markdown
Contributor

@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
@netlify
Copy link
Copy Markdown

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
Comment thread cmd/network/status.go Outdated
fmt.Println()

fmt.Printf("Chain context: %s", consensus.ChainContext)
fmt.Printf("Chain context: %s (%s)", npa.PrettyPrintNetwork(), consensus.ChainContext)
Copy link
Copy Markdown
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
Copy Markdown
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