solana-cli: selectively require keypair (#6477)

* Make parse_command consistent

* Strip pubkey out of parse_stake_create_account

* Move validator-info args into module

* Strip pubkey out of parse_validator_info_command

* Strip pubkey out of parse_vote_create_account

* Strip pubkey out of balance parsing

* Strip pubkey out of parse pay

* Only verify keypair existence if command requires it

* Use struct instead of tuple
This commit is contained in:
Tyera Eulberg
2019-10-21 17:08:09 -06:00
committed by GitHub
parent 564c14a2c6
commit 8319fa05d0
8 changed files with 842 additions and 571 deletions

View File

@ -70,7 +70,7 @@ fn test_cli_timestamp_tx() {
timestamp: Some(dt),
timestamp_pubkey: Some(config_witness.keypair.pubkey()),
witnesses: None,
cancelable: None,
cancelable: false,
};
let sig_response = process_command(&config_payer);
@ -137,7 +137,7 @@ fn test_cli_witness_tx() {
timestamp: None,
timestamp_pubkey: None,
witnesses: Some(vec![config_witness.keypair.pubkey()]),
cancelable: None,
cancelable: false,
};
let sig_response = process_command(&config_payer);
@ -197,7 +197,7 @@ fn test_cli_cancel_tx() {
timestamp: None,
timestamp_pubkey: None,
witnesses: Some(vec![config_witness.keypair.pubkey()]),
cancelable: Some(config_payer.keypair.pubkey()),
cancelable: true,
};
let sig_response = process_command(&config_payer).unwrap();