This commit is contained in:
Hardhat Chad
2025-09-22 13:41:32 -07:00
parent 23fe0870dc
commit 38e378f349
4 changed files with 28 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
use ore_api::prelude::*;
use solana_program::{log::sol_log, native_token::lamports_to_sol};
use steel::*;
/// Claims a block reward.
@@ -20,6 +21,8 @@ pub fn process_claim_sol(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramRe
// Normalize amount.
let amount = miner.rewards_sol.min(amount);
sol_log(&format!("Claiming {} SOL", lamports_to_sol(amount)).as_str());
// Update miner.
miner.rewards_sol -= amount;