mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-18 07:26:44 +00:00
cleanup
This commit is contained in:
@@ -1,12 +1,7 @@
|
||||
use std::mem::size_of;
|
||||
|
||||
use ore_api::{consts::*, instruction::Open, state::Proof};
|
||||
use solana_program::{
|
||||
keccak::hashv,
|
||||
slot_hashes::SlotHash,
|
||||
system_program,
|
||||
sysvar::{self, Sysvar},
|
||||
};
|
||||
use solana_program::{keccak::hashv, slot_hashes::SlotHash};
|
||||
use steel::*;
|
||||
|
||||
/// Open creates a new proof account to track a miner's state.
|
||||
@@ -38,7 +33,7 @@ pub fn process_open(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramResult
|
||||
system_program,
|
||||
payer_info,
|
||||
)?;
|
||||
let clock = Clock::get().or(Err(ProgramError::InvalidAccountData))?;
|
||||
let clock = Clock::get()?;
|
||||
let proof = proof_info.to_account_mut::<Proof>(&ore_api::ID)?;
|
||||
proof.authority = *signer_info.key;
|
||||
proof.balance = 0;
|
||||
|
||||
Reference in New Issue
Block a user