mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-13 15:09:57 +00:00
checkpoint
This commit is contained in:
@@ -25,9 +25,12 @@ pub fn process_checkpoint(accounts: &[AccountInfo<'_>], _data: &[u8]) -> Program
|
||||
miner.checkpoint_id = miner.round_id;
|
||||
return Ok(());
|
||||
}
|
||||
let round = round_info
|
||||
.as_account_mut::<Round>(&ore_api::ID)?
|
||||
.assert_mut(|r| r.id == miner.round_id)?; // Ensure miner round ID matches the provided round.
|
||||
let round = round_info.as_account_mut::<Round>(&ore_api::ID)?;
|
||||
|
||||
// Ensure miner round ID matches the provided round.
|
||||
if round.id != miner.round_id {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
treasury_info.as_account::<Treasury>(&ore_api::ID)?;
|
||||
system_program.is_program(&system_program::ID)?;
|
||||
|
||||
@@ -2,8 +2,6 @@ use ore_api::prelude::*;
|
||||
use solana_program::{keccak::hashv, log::sol_log, native_token::lamports_to_sol};
|
||||
use steel::*;
|
||||
|
||||
use crate::AUTHORIZED_ACCOUNTS;
|
||||
|
||||
/// Deploys capital to prospect on a square.
|
||||
pub fn process_deploy(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramResult {
|
||||
// Parse data.
|
||||
|
||||
Reference in New Issue
Block a user