issue #10831: added --with-memo option to all cli commands that submit (#16291)

* issue #10831: added --with-memo option to all cli commands that submit
transactions.  Also, improve the block command to show UTF-8 string instead
of integer values for memo program data.

* Fixed tests and changed some syntax according to feedback.

* Use spl_memo id (all versions where applicable) instead of hardcoding id.

* Update Cargo.toml in programs/bpf.

* Update formatting via cargo fmt.

* Update to use spl_memo version 3.0.1, which simplifies package imports
This commit is contained in:
bji
2021-04-05 13:53:50 -07:00
committed by GitHub
parent 43feef7362
commit 364af3a3e0
19 changed files with 452 additions and 77 deletions

View File

@@ -50,6 +50,7 @@ fn test_vote_authorize_and_withdraw() {
authorized_voter: None,
authorized_withdrawer: Some(config.signers[0].pubkey()),
commission: 0,
memo: None,
};
process_command(&config).unwrap();
let vote_account = rpc_client
@@ -77,6 +78,7 @@ fn test_vote_authorize_and_withdraw() {
blockhash_query: BlockhashQuery::All(blockhash_query::Source::Cluster),
nonce_account: None,
nonce_authority: 0,
memo: None,
fee_payer: 0,
derived_address_seed: None,
derived_address_program_id: None,
@@ -92,6 +94,7 @@ fn test_vote_authorize_and_withdraw() {
vote_account_pubkey,
new_authorized_pubkey: withdraw_authority.pubkey(),
vote_authorize: VoteAuthorize::Withdrawer,
memo: None,
};
process_command(&config).unwrap();
let vote_account = rpc_client
@@ -109,6 +112,7 @@ fn test_vote_authorize_and_withdraw() {
withdraw_authority: 1,
withdraw_amount: SpendAmount::Some(100),
destination_account_pubkey: destination_account,
memo: None,
};
process_command(&config).unwrap();
check_recent_balance(expected_balance - 100, &rpc_client, &vote_account_pubkey);
@@ -121,6 +125,7 @@ fn test_vote_authorize_and_withdraw() {
vote_account_pubkey,
new_identity_account: 2,
withdraw_authority: 1,
memo: None,
};
process_command(&config).unwrap();
}