mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-14 15:10:13 +00:00
miner as fee payer
This commit is contained in:
@@ -33,13 +33,11 @@ pub fn process_open<'a, 'info>(
|
||||
let args = OpenArgs::try_from_bytes(data)?;
|
||||
|
||||
// Load accounts
|
||||
let [signer, payer_info, miner_info, 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(payer_info)?;
|
||||
load_system_account(miner_info, false)?;
|
||||
load_signer(miner_info)?;
|
||||
load_uninitialized_pda(
|
||||
proof_info,
|
||||
&[PROOF, signer.key.as_ref()],
|
||||
@@ -56,7 +54,7 @@ pub fn process_open<'a, 'info>(
|
||||
8 + size_of::<Proof>(),
|
||||
&[PROOF, signer.key.as_ref(), &[args.bump]],
|
||||
system_program,
|
||||
payer_info,
|
||||
miner_info,
|
||||
)?;
|
||||
let clock = Clock::get().or(Err(ProgramError::InvalidAccountData))?;
|
||||
let mut proof_data = proof_info.data.borrow_mut();
|
||||
|
||||
Reference in New Issue
Block a user