return data

This commit is contained in:
Hardhat Chad
2024-02-16 01:42:08 +00:00
parent 1ae3fdfdcc
commit f0964ddf97
2 changed files with 5 additions and 3 deletions

View File

@@ -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)]

View File

@@ -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(())
}