Notice the user when the --mint, --bpf-program, or --clone arguments are ignored

This commit is contained in:
Michael Vines
2021-03-17 11:01:49 -07:00
committed by mergify[bot]
parent 8a9b51952e
commit 59c19d9fbf
2 changed files with 23 additions and 2 deletions

View File

@ -354,6 +354,18 @@ fn main() {
});
}
if TestValidatorGenesis::ledger_exists(&ledger_path) {
for (name, long) in &[
("bpf_program", "--bpf-program"),
("clone_account", "--clone"),
("mint_address", "--mint"),
] {
if matches.is_present(name) {
println!("{} argument ignored, ledger already exists", long);
}
}
}
let mut genesis = TestValidatorGenesis::default();
admin_rpc_service::run(