diff --git a/src/instruction.rs b/src/instruction.rs index 810f702..8e5d585 100644 --- a/src/instruction.rs +++ b/src/instruction.rs @@ -8,8 +8,8 @@ use solana_program::{ }; use crate::{ - impl_instruction_from_bytes, impl_to_bytes, state::Hash, BUS, BUS_ADDRESSES, MINT, - MINT_ADDRESS, PROOF, TREASURY, TREASURY_ADDRESS, + impl_instruction_from_bytes, impl_to_bytes, state::Hash, BUS, MINT, MINT_ADDRESS, PROOF, + TREASURY, TREASURY_ADDRESS, }; #[repr(u8)] diff --git a/src/processor/mine.rs b/src/processor/mine.rs index 0898d9e..ed91db2 100644 --- a/src/processor/mine.rs +++ b/src/processor/mine.rs @@ -5,6 +5,7 @@ use solana_program::{ clock::Clock, entrypoint::ProgramResult, keccak::{hashv, Hash as KeccakHash}, + program::set_return_data, program_error::ProgramError, program_memory::sol_memcmp, pubkey::Pubkey, @@ -76,7 +77,8 @@ pub fn process_mine<'a, 'info>( proof.total_hashes = proof.total_hashes.saturating_add(1); proof.total_rewards = proof.total_rewards.saturating_add(1); - // TODO Log? + // Set return data + set_return_data(treasury.reward_rate.to_le_bytes().as_slice()); Ok(()) }