Run codemod --extensions rs Pubkey::new_rand solana_sdk::pubkey::new_rand
This commit is contained in:
@ -630,7 +630,7 @@ pub async fn test_process_distribute_tokens_with_client(
|
||||
sol_to_lamports(1.0),
|
||||
);
|
||||
|
||||
let alice_pubkey = Pubkey::new_rand();
|
||||
let alice_pubkey = solana_sdk::pubkey::new_rand();
|
||||
let allocation = Allocation {
|
||||
recipient: alice_pubkey.to_string(),
|
||||
amount: if let Some(amount) = transfer_amount {
|
||||
@ -751,7 +751,7 @@ pub async fn test_process_distribute_stake_with_client(
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
let alice_pubkey = Pubkey::new_rand();
|
||||
let alice_pubkey = solana_sdk::pubkey::new_rand();
|
||||
let allocation = Allocation {
|
||||
recipient: alice_pubkey.to_string(),
|
||||
amount: 1000.0,
|
||||
@ -896,7 +896,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_read_allocations() {
|
||||
let alice_pubkey = Pubkey::new_rand();
|
||||
let alice_pubkey = solana_sdk::pubkey::new_rand();
|
||||
let allocation = Allocation {
|
||||
recipient: alice_pubkey.to_string(),
|
||||
amount: 42.0,
|
||||
@ -916,9 +916,9 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_read_allocations_transfer_amount() {
|
||||
let pubkey0 = Pubkey::new_rand();
|
||||
let pubkey1 = Pubkey::new_rand();
|
||||
let pubkey2 = Pubkey::new_rand();
|
||||
let pubkey0 = solana_sdk::pubkey::new_rand();
|
||||
let pubkey1 = solana_sdk::pubkey::new_rand();
|
||||
let pubkey2 = solana_sdk::pubkey::new_rand();
|
||||
let file = NamedTempFile::new().unwrap();
|
||||
let input_csv = file.path().to_str().unwrap().to_string();
|
||||
let mut wtr = csv::WriterBuilder::new().from_writer(file);
|
||||
@ -955,8 +955,8 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_apply_previous_transactions() {
|
||||
let alice = Pubkey::new_rand();
|
||||
let bob = Pubkey::new_rand();
|
||||
let alice = solana_sdk::pubkey::new_rand();
|
||||
let bob = solana_sdk::pubkey::new_rand();
|
||||
let mut allocations = vec![
|
||||
Allocation {
|
||||
recipient: alice.to_string(),
|
||||
@ -984,8 +984,8 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_has_same_recipient() {
|
||||
let alice_pubkey = Pubkey::new_rand();
|
||||
let bob_pubkey = Pubkey::new_rand();
|
||||
let alice_pubkey = solana_sdk::pubkey::new_rand();
|
||||
let bob_pubkey = solana_sdk::pubkey::new_rand();
|
||||
let lockup0 = "2021-01-07T00:00:00Z".to_string();
|
||||
let lockup1 = "9999-12-31T23:59:59Z".to_string();
|
||||
let alice_alloc = Allocation {
|
||||
@ -1041,8 +1041,8 @@ mod tests {
|
||||
amount: 1.0,
|
||||
lockup_date: lockup_date_str.to_string(),
|
||||
};
|
||||
let stake_account_address = Pubkey::new_rand();
|
||||
let new_stake_account_address = Pubkey::new_rand();
|
||||
let stake_account_address = solana_sdk::pubkey::new_rand();
|
||||
let new_stake_account_address = solana_sdk::pubkey::new_rand();
|
||||
let lockup_authority = Keypair::new();
|
||||
let stake_args = StakeArgs {
|
||||
stake_account_address,
|
||||
@ -1092,7 +1092,7 @@ mod tests {
|
||||
fee_payer: &str,
|
||||
stake_args: Option<StakeArgs>,
|
||||
) -> (Vec<Allocation>, DistributeTokensArgs) {
|
||||
let recipient = Pubkey::new_rand();
|
||||
let recipient = solana_sdk::pubkey::new_rand();
|
||||
let allocations = vec![Allocation {
|
||||
recipient: recipient.to_string(),
|
||||
amount: allocation_amount,
|
||||
@ -1369,7 +1369,7 @@ mod tests {
|
||||
// Underfunded stake-account
|
||||
let expensive_allocation_amount = 5000.0;
|
||||
let expensive_allocations = vec![Allocation {
|
||||
recipient: Pubkey::new_rand().to_string(),
|
||||
recipient: solana_sdk::pubkey::new_rand().to_string(),
|
||||
amount: expensive_allocation_amount,
|
||||
lockup_date: "".to_string(),
|
||||
}];
|
||||
|
@ -225,7 +225,7 @@ mod tests {
|
||||
};
|
||||
let info2 = TransactionInfo::default();
|
||||
let info3 = TransactionInfo {
|
||||
recipient: Pubkey::new_rand(),
|
||||
recipient: solana_sdk::pubkey::new_rand(),
|
||||
..TransactionInfo::default()
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user