mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-16 23:16:47 +00:00
split miner authority
This commit is contained in:
@@ -57,7 +57,7 @@ pub fn process_mine<'a, 'info>(
|
||||
load_signer(signer)?;
|
||||
load_any_bus(bus_info, true)?;
|
||||
load_config(config_info, false)?;
|
||||
load_proof(proof_info, signer.key, true)?;
|
||||
load_proof_with_miner(proof_info, signer.key, true)?;
|
||||
load_sysvar(instructions_sysvar, sysvar::instructions::id())?;
|
||||
load_sysvar(slot_hashes_sysvar, sysvar::slot_hashes::id())?;
|
||||
|
||||
|
||||
@@ -39,10 +39,11 @@ pub fn process_open<'a, 'info>(
|
||||
let args = OpenArgs::try_from_bytes(data)?;
|
||||
|
||||
// Load accounts
|
||||
let [signer, proof_info, system_program, slot_hashes_info] = accounts else {
|
||||
let [signer, miner_info, proof_info, system_program, slot_hashes_info] = accounts else {
|
||||
return Err(ProgramError::NotEnoughAccountKeys);
|
||||
};
|
||||
load_signer(signer)?;
|
||||
load_signer(miner_info)?;
|
||||
load_uninitialized_pda(
|
||||
proof_info,
|
||||
&[PROOF, signer.key.as_ref()],
|
||||
@@ -75,6 +76,7 @@ pub fn process_open<'a, 'info>(
|
||||
proof.last_hash = [0; 32];
|
||||
proof.last_hash_at = clock.unix_timestamp;
|
||||
proof.last_stake_at = clock.unix_timestamp;
|
||||
proof.miner = *miner_info.key;
|
||||
proof.total_hashes = 0;
|
||||
proof.total_rewards = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user