mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-13 23:16:52 +00:00
migrate
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use steel::*;
|
||||
|
||||
use crate::state::miner_pda;
|
||||
use crate::state::{miner_pda, OreAccountOLD};
|
||||
|
||||
use super::OreAccount;
|
||||
|
||||
@@ -36,6 +36,35 @@ 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 miner's prospects in the current round.
|
||||
pub deployed: [u64; 25],
|
||||
|
||||
/// The executor with permmission to deploy capital with this account.
|
||||
#[deprecated(note = "Use automation executor instead")]
|
||||
pub executor: Pubkey,
|
||||
|
||||
/// The amount of SOL this miner can claim.
|
||||
pub rewards_sol: u64,
|
||||
|
||||
/// The amount of ORE this miner can claim.
|
||||
pub rewards_ore: u64,
|
||||
|
||||
/// The ID of the round this miner last played in.
|
||||
pub round_id: u64,
|
||||
|
||||
/// The total amount of SOL this miner has mined across all blocks.
|
||||
pub lifetime_rewards_sol: u64,
|
||||
|
||||
/// The total amount of ORE this miner has mined across all blocks.
|
||||
pub lifetime_rewards_ore: u64,
|
||||
}
|
||||
|
||||
impl Miner {
|
||||
pub fn pda(&self) -> (Pubkey, u8) {
|
||||
miner_pda(self.authority)
|
||||
@@ -43,3 +72,4 @@ impl Miner {
|
||||
}
|
||||
|
||||
account!(OreAccount, Miner);
|
||||
account!(OreAccountOLD, MinerOLD);
|
||||
|
||||
Reference in New Issue
Block a user