Rename replicator to archiver (#6464)

* Rename replicator to archiver

* cargo fmt

* Fix grammar
This commit is contained in:
Greg Fitzgerald
2019-10-21 11:29:37 -06:00
committed by GitHub
parent 6c79f56c2c
commit 9232057e95
61 changed files with 529 additions and 560 deletions

View File

@ -218,8 +218,8 @@ pub fn parse_command(
("redeem-vote-credits", Some(matches)) => parse_redeem_vote_credits(matches),
("show-stake-account", Some(matches)) => parse_show_stake_account(matches),
// Storage Commands
("create-replicator-storage-account", Some(matches)) => {
parse_storage_create_replicator_account(matches)
("create-archiver-storage-account", Some(matches)) => {
parse_storage_create_archiver_account(matches)
}
("create-validator-storage-account", Some(matches)) => {
parse_storage_create_validator_account(matches)

View File

@ -21,8 +21,8 @@ pub trait StorageSubCommands {
impl StorageSubCommands for App<'_, '_> {
fn storage_subcommands(self) -> Self {
self.subcommand(
SubCommand::with_name("create-replicator-storage-account")
.about("Create a replicator storage account")
SubCommand::with_name("create-archiver-storage-account")
.about("Create an archiver storage account")
.arg(
Arg::with_name("storage_account_owner")
.index(1)
@ -98,7 +98,7 @@ impl StorageSubCommands for App<'_, '_> {
}
}
pub fn parse_storage_create_replicator_account(
pub fn parse_storage_create_archiver_account(
matches: &ArgMatches<'_>,
) -> Result<CliCommand, CliError> {
let account_owner = pubkey_of(matches, "storage_account_owner").unwrap();
@ -106,7 +106,7 @@ pub fn parse_storage_create_replicator_account(
Ok(CliCommand::CreateStorageAccount {
account_owner,
storage_account_pubkey,
account_type: StorageAccountType::Replicator,
account_type: StorageAccountType::Archiver,
})
}
@ -221,18 +221,18 @@ mod tests {
let storage_account_pubkey = Pubkey::new_rand();
let storage_account_string = storage_account_pubkey.to_string();
let test_create_replicator_storage_account = test_commands.clone().get_matches_from(vec![
let test_create_archiver_storage_account = test_commands.clone().get_matches_from(vec![
"test",
"create-replicator-storage-account",
"create-archiver-storage-account",
&pubkey_string,
&storage_account_string,
]);
assert_eq!(
parse_command(&pubkey, &test_create_replicator_storage_account).unwrap(),
parse_command(&pubkey, &test_create_archiver_storage_account).unwrap(),
CliCommand::CreateStorageAccount {
account_owner: pubkey,
storage_account_pubkey,
account_type: StorageAccountType::Replicator,
account_type: StorageAccountType::Archiver,
}
);