checkpoint

This commit is contained in:
Hardhat Chad
2025-10-03 09:44:10 -07:00
parent a2bd407902
commit 81f882674e
3 changed files with 7 additions and 6 deletions

View File

@@ -351,7 +351,7 @@ async fn checkpoint_all(
);
// If we are in fee collection period, checkpoint the miner.
if clock.slot >= expires_at - ONE_DAY_SLOTS {
if clock.slot >= expires_at - TWELVE_HOURS_SLOTS {
ixs.push(ore_api::sdk::checkpoint(
payer.pubkey(),
miner.authority,

View File

@@ -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)?;

View File

@@ -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.