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

@@ -1,4 +1,4 @@
use solana_sdk::{pubkey::Pubkey, system_instruction::create_address_with_seed};
use solana_sdk::pubkey::Pubkey;
#[derive(Default)]
pub struct AddressGenerator {
@@ -17,7 +17,7 @@ impl AddressGenerator {
}
pub fn nth(&self, nth: usize) -> Pubkey {
create_address_with_seed(&self.base_pubkey, &format!("{}", nth), &self.program_id).unwrap()
Pubkey::create_with_seed(&self.base_pubkey, &format!("{}", nth), &self.program_id).unwrap()
}
#[allow(clippy::should_implement_trait)]