mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-19 23:16:46 +00:00
migration
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
use ore_api::prelude::*;
|
||||
use steel::*;
|
||||
|
||||
use crate::whitelist::AUTHORIZED_ACCOUNTS;
|
||||
|
||||
/// Claims a block reward.
|
||||
pub fn process_prospect(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramResult {
|
||||
// Parse data.
|
||||
@@ -32,6 +34,11 @@ pub fn process_prospect(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramRes
|
||||
.assert_mut(|s| s.id == square_id)?;
|
||||
system_program.is_program(&system_program::ID)?;
|
||||
|
||||
// Chekc whitelist
|
||||
if !AUTHORIZED_ACCOUNTS.contains(&signer_info.key) {
|
||||
return Err(ProgramError::InvalidAccountData);
|
||||
}
|
||||
|
||||
// Create miner.
|
||||
let miner = if miner_info.data_is_empty() {
|
||||
create_program_account::<Miner>(
|
||||
|
||||
Reference in New Issue
Block a user