mirror of
https://github.com/d0zingcat/ore.git
synced 2026-06-03 07:36:49 +00:00
log
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
use ore_api::prelude::*;
|
||||
use solana_program::log::sol_log;
|
||||
use spl_token::amount_to_ui_amount;
|
||||
use steel::*;
|
||||
|
||||
/// Claims a block reward.
|
||||
@@ -43,6 +45,14 @@ pub fn process_claim_ore(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramRe
|
||||
// Normalize amount.
|
||||
let amount = miner.rewards_ore.min(amount);
|
||||
|
||||
sol_log(
|
||||
&format!(
|
||||
"Claiming {} ORE",
|
||||
amount_to_ui_amount(amount, TOKEN_DECIMALS)
|
||||
)
|
||||
.as_str(),
|
||||
);
|
||||
|
||||
// Update miner.
|
||||
miner.rewards_ore -= amount;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user