Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 05325a5

Browse files
authored
fix (#2278)
1 parent 11a5551 commit 05325a5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

stake-pool/program/src/processor.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,11 @@ impl Processor {
507507
return Err(StakePoolError::SignatureMissing.into());
508508
}
509509

510+
if stake_pool_info.key == validator_list_info.key {
511+
msg!("Cannot use same account for stake pool and validator list");
512+
return Err(StakePoolError::AlreadyInUse.into());
513+
}
514+
510515
check_account_owner(stake_pool_info, program_id)?;
511516
let mut stake_pool = try_from_slice_unchecked::<StakePool>(&stake_pool_info.data.borrow())?;
512517
if !stake_pool.is_uninitialized() {

0 commit comments

Comments
 (0)