Skip to content

Commit

Permalink
neard: remove ‘testnet’ command alias (#7033)
Browse files Browse the repository at this point in the history
The ‘testnet’ command has been deprecated since 1.24 in favour of
‘localnet’.  Remove it.
  • Loading branch information
mina86 authored Jun 14, 2022
1 parent e75d1e8 commit 1ca6056
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
RocksDB configurable via `config.json` file (at `store.path` path)
rather than being hard-coded to `data` directory in neard home
directory [#6938](https://github.com/near/nearcore/pull/6938)
* Removed `testnet` alias for `localnet` command; the alias has been
deprecated since 1.24 [#7033](https://github.com/near/nearcore/pull/7033)
* Removed undocumented `unsafe_reset_all` and `unsafe_reset_data`
commands. They were deprecated since 1.25

Expand Down
14 changes: 0 additions & 14 deletions neard/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,6 @@ impl NeardCmd {
match neard_cmd.subcmd {
NeardSubCommand::Init(cmd) => cmd.run(&home_dir),
NeardSubCommand::Localnet(cmd) => cmd.run(&home_dir),
NeardSubCommand::Testnet(cmd) => {
warn!(
"The 'testnet' command has been renamed to 'localnet' \
and will be removed in the future"
);
cmd.run(&home_dir);
}
NeardSubCommand::Run(cmd) => cmd.run(&home_dir, genesis_validation, runtime),

NeardSubCommand::StateViewer(cmd) => {
Expand Down Expand Up @@ -161,13 +154,6 @@ pub(super) enum NeardSubCommand {
/// Sets up local configuration with all necessary files (validator key, node key, genesis and
/// config)
Localnet(LocalnetCmd),
/// DEPRECATED: this command has been renamed to 'localnet' and will be removed in a future
/// release.
// We’re not using clap(alias = "testnet") on Localnet because we want this
// to be a separate subcommand with a deprecation warning. TODO(#4372):
// Deprecated since 1.24. Delete it in a couple of releases in 2022.
#[clap(hide = true)]
Testnet(LocalnetCmd),
/// View DB state.
#[clap(name = "view-state", alias = "view_state")]
StateViewer(StateViewerCommand),
Expand Down

0 comments on commit 1ca6056

Please sign in to comment.