This commit is contained in:
Hardhat Chad
2025-09-18 09:01:56 -07:00
parent 9f9be6b80e
commit 55666405ef
5 changed files with 3 additions and 82 deletions

View File

@@ -1,6 +1,6 @@
use steel::*;
use crate::state::{miner_pda, OreAccountOLD};
use crate::state::miner_pda;
use super::OreAccount;
@@ -29,31 +29,6 @@ pub struct Miner {
pub lifetime_rewards_ore: u64,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
pub struct MinerOLD {
/// The authority of this miner account.
pub authority: Pubkey,
/// The ID of the last block this miner mined in.
pub block_id: u64,
/// An account authorized to execute actions on behalf of this miner.
pub executor: Pubkey,
/// The amount of hashpower this miner has committed to the current block.
pub hashpower: u64,
/// A user-supplied seed for random number generation.
pub seed: [u8; 32],
/// The total amount of hashpower this miner has committed across all blocks.
pub total_hashpower: u64,
/// The total amount of ORE this miner has mined across all blocks.
pub total_rewards: u64,
}
impl Miner {
pub fn pda(&self) -> (Pubkey, u8) {
miner_pda(self.authority)
@@ -61,4 +36,3 @@ impl Miner {
}
account!(OreAccount, Miner);
account!(OreAccountOLD, MinerOLD);