|
|
@@ -1840,10 +1840,7 @@ mod tests {
|
|
|
.unwrap();
|
|
|
assert_eq!(signer_info.signers.len(), 1);
|
|
|
assert_eq!(signer_info.index_of(None), Some(0));
|
|
|
- assert_eq!(
|
|
|
- signer_info.index_of(Some(solana_sdk::pubkey::new_rand())),
|
|
|
- None
|
|
|
- );
|
|
|
+ assert_eq!(signer_info.index_of(Some(solana_pubkey::new_rand())), None);
|
|
|
|
|
|
let keypair0 = keypair_from_seed(&[1u8; 32]).unwrap();
|
|
|
let keypair0_pubkey = keypair0.pubkey();
|
|
|
@@ -1904,7 +1901,7 @@ mod tests {
|
|
|
fn test_cli_parse_command() {
|
|
|
let test_commands = get_clap_app("test", "desc", "version");
|
|
|
|
|
|
- let pubkey = solana_sdk::pubkey::new_rand();
|
|
|
+ let pubkey = solana_pubkey::new_rand();
|
|
|
let pubkey_string = format!("{pubkey}");
|
|
|
|
|
|
let default_keypair = Keypair::new();
|
|
|
@@ -1983,7 +1980,7 @@ mod tests {
|
|
|
assert!(parse_command(&test_bad_signature, &default_signer, &mut None).is_err());
|
|
|
|
|
|
// Test CreateAddressWithSeed
|
|
|
- let from_pubkey = solana_sdk::pubkey::new_rand();
|
|
|
+ let from_pubkey = solana_pubkey::new_rand();
|
|
|
let from_str = from_pubkey.to_string();
|
|
|
for (name, program_id) in &[
|
|
|
("STAKE", stake::program::id()),
|
|
|
@@ -2166,7 +2163,7 @@ mod tests {
|
|
|
..CliConfig::default()
|
|
|
};
|
|
|
let current_authority = keypair_from_seed(&[5; 32]).unwrap();
|
|
|
- let new_authorized_pubkey = solana_sdk::pubkey::new_rand();
|
|
|
+ let new_authorized_pubkey = solana_pubkey::new_rand();
|
|
|
vote_config.signers = vec![¤t_authority];
|
|
|
vote_config.command = CliCommand::VoteAuthorize {
|
|
|
vote_account_pubkey: bob_pubkey,
|
|
|
@@ -2206,7 +2203,7 @@ mod tests {
|
|
|
|
|
|
let bob_keypair = Keypair::new();
|
|
|
let bob_pubkey = bob_keypair.pubkey();
|
|
|
- let custodian = solana_sdk::pubkey::new_rand();
|
|
|
+ let custodian = solana_pubkey::new_rand();
|
|
|
config.command = CliCommand::CreateStakeAccount {
|
|
|
stake_account: 1,
|
|
|
seed: None,
|
|
|
@@ -2233,8 +2230,8 @@ mod tests {
|
|
|
let result = process_command(&config);
|
|
|
assert!(result.is_ok());
|
|
|
|
|
|
- let stake_account_pubkey = solana_sdk::pubkey::new_rand();
|
|
|
- let to_pubkey = solana_sdk::pubkey::new_rand();
|
|
|
+ let stake_account_pubkey = solana_pubkey::new_rand();
|
|
|
+ let to_pubkey = solana_pubkey::new_rand();
|
|
|
config.command = CliCommand::WithdrawStake {
|
|
|
stake_account_pubkey,
|
|
|
destination_account_pubkey: to_pubkey,
|
|
|
@@ -2255,7 +2252,7 @@ mod tests {
|
|
|
let result = process_command(&config);
|
|
|
assert!(result.is_ok());
|
|
|
|
|
|
- let stake_account_pubkey = solana_sdk::pubkey::new_rand();
|
|
|
+ let stake_account_pubkey = solana_pubkey::new_rand();
|
|
|
config.command = CliCommand::DeactivateStake {
|
|
|
stake_account_pubkey,
|
|
|
stake_authority: 0,
|
|
|
@@ -2273,7 +2270,7 @@ mod tests {
|
|
|
let result = process_command(&config);
|
|
|
assert!(result.is_ok());
|
|
|
|
|
|
- let stake_account_pubkey = solana_sdk::pubkey::new_rand();
|
|
|
+ let stake_account_pubkey = solana_pubkey::new_rand();
|
|
|
let split_stake_account = Keypair::new();
|
|
|
config.command = CliCommand::SplitStake {
|
|
|
stake_account_pubkey,
|
|
|
@@ -2295,8 +2292,8 @@ mod tests {
|
|
|
let result = process_command(&config);
|
|
|
assert!(result.is_ok());
|
|
|
|
|
|
- let stake_account_pubkey = solana_sdk::pubkey::new_rand();
|
|
|
- let source_stake_account_pubkey = solana_sdk::pubkey::new_rand();
|
|
|
+ let stake_account_pubkey = solana_pubkey::new_rand();
|
|
|
+ let source_stake_account_pubkey = solana_pubkey::new_rand();
|
|
|
let merge_stake_account = Keypair::new();
|
|
|
config.command = CliCommand::MergeStake {
|
|
|
stake_account_pubkey,
|
|
|
@@ -2322,7 +2319,7 @@ mod tests {
|
|
|
assert_eq!(process_command(&config).unwrap(), "1234");
|
|
|
|
|
|
// CreateAddressWithSeed
|
|
|
- let from_pubkey = solana_sdk::pubkey::new_rand();
|
|
|
+ let from_pubkey = solana_pubkey::new_rand();
|
|
|
config.signers = vec![];
|
|
|
config.command = CliCommand::CreateAddressWithSeed {
|
|
|
from_pubkey: Some(from_pubkey),
|
|
|
@@ -2335,7 +2332,7 @@ mod tests {
|
|
|
assert_eq!(address.unwrap(), expected_address.to_string());
|
|
|
|
|
|
// Need airdrop cases
|
|
|
- let to = solana_sdk::pubkey::new_rand();
|
|
|
+ let to = solana_pubkey::new_rand();
|
|
|
config.signers = vec![&keypair];
|
|
|
config.command = CliCommand::Airdrop {
|
|
|
pubkey: Some(to),
|