Move address creation with seed into pubkey (#8991)

This commit is contained in:
Jack May
2020-03-20 15:20:48 -07:00
committed by GitHub
parent 1aab959d4e
commit e28368ff1b
11 changed files with 117 additions and 113 deletions

View File

@@ -17,7 +17,7 @@ use solana_sdk::{
account_utils::StateMut,
message::Message,
pubkey::Pubkey,
system_instruction::{create_address_with_seed, SystemError},
system_instruction::SystemError,
sysvar::{
stake_history::{self, StakeHistory},
Sysvar,
@@ -769,7 +769,7 @@ pub fn process_create_stake_account(
) -> ProcessResult {
let stake_account = config.signers[stake_account];
let stake_account_address = if let Some(seed) = seed {
create_address_with_seed(&stake_account.pubkey(), &seed, &solana_stake_program::id())?
Pubkey::create_with_seed(&stake_account.pubkey(), &seed, &solana_stake_program::id())?
} else {
stake_account.pubkey()
};
@@ -1085,7 +1085,7 @@ pub fn process_split_stake(
let stake_authority = config.signers[stake_authority];
let split_stake_account_address = if let Some(seed) = split_stake_account_seed {
create_address_with_seed(
Pubkey::create_with_seed(
&split_stake_account.pubkey(),
&seed,
&solana_stake_program::id(),