-
Notifications
You must be signed in to change notification settings - Fork 107
default to testnet when no network specified #2055
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds fallback behavior so that if no RPC URL, network passphrase, or network name is provided, the CLI first attempts to use the default network from the user config and otherwise defaults to the testnet. Also includes a new unit test for the testnet-default case.
- Introduce logic to read
config.defaults.networkand fall back to"testnet"when nothing is specified - Add a Tokio test to verify the default-to-testnet behavior
Comments suppressed due to low confidence (1)
cmd/soroban-cli/src/config/network.rs:473
- The test references
passphrase::TESTNETbut doesn’t import thepassphrasemodule; adduse super::super::passphrase;(or the correct path) to bring the constant into scope and prevent a compile error.
use super::super::locator;
Why
Solves
#2049