Skip to content

Commit a27f2b1

Browse files
authored
program: reserve DepositSol (#602)
1 parent 5c2553b commit a27f2b1

3 files changed

Lines changed: 14 additions & 0 deletions

File tree

program/src/instruction.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,12 @@ pub enum SinglePoolInstruction {
169169
/// 4. `[]` System program
170170
/// 5. `[]` Stake program
171171
InitializePoolOnRamp,
172+
173+
/// (reserved for future use)
174+
DepositSol {
175+
/// Amount of sol to deposit
176+
lamports: u64,
177+
},
172178
}
173179

174180
/// Creates all necessary instructions to initialize the stake pool.

program/src/processor.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1523,6 +1523,10 @@ impl Processor {
15231523
msg!("Instruction: InitializePoolOnRamp");
15241524
Self::process_initialize_pool_onramp(program_id, accounts)
15251525
}
1526+
SinglePoolInstruction::DepositSol { lamports: _ } => {
1527+
msg!("Instruction: DepositSol (NOT IMPLEMENTED)");
1528+
Err(ProgramError::InvalidInstructionData)
1529+
}
15261530
}
15271531
}
15281532
}

program/tests/accounts.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,9 @@ fn make_basic_instruction(
267267
SinglePoolInstruction::InitializePoolOnRamp => {
268268
instruction::initialize_pool_onramp(&id(), &accounts.pool)
269269
}
270+
SinglePoolInstruction::DepositSol { .. } => {
271+
unimplemented!()
272+
}
270273
}
271274
}
272275

@@ -316,6 +319,7 @@ fn consistent_account_order() {
316319
},
317320
),
318321
make_basic_instruction(&accounts, SinglePoolInstruction::InitializePoolOnRamp),
322+
// TODO SinglePoolInstruction::DepositSol
319323
];
320324

321325
for instruction in instructions {

0 commit comments

Comments
 (0)