coal_api/state/
reprocessor.rs

1use bytemuck::{Pod, Zeroable};
2use solana_program::pubkey::Pubkey;
3
4use crate::utils::{impl_account_from_bytes, impl_to_bytes, Discriminator};
5
6use super::AccountDiscriminator;
7
8/// Proof accounts track a miner's current hash, claimable rewards, and lifetime stats.
9/// Every miner is allowed one proof account which is required by the program to mine or claim rewards.
10#[repr(C)]
11#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
12pub struct Reprocessor {
13    /// The reprocess authority.
14    pub authority: Pubkey,
15    /// The slot the reprocessor was created at.
16    pub slot: u64,
17    /// Sysvar hashes
18    pub hash: [u8; 32],
19}
20
21impl Discriminator for Reprocessor {
22    fn discriminator() -> u8 {
23        AccountDiscriminator::Reprocessor.into()
24    }
25}
26
27impl_to_bytes!(Reprocessor);
28impl_account_from_bytes!(Reprocessor);