Skip to content

Commit 879491e

Browse files
committed
truncate in split
1 parent 4e21bd2 commit 879491e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

program/src/processor.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,8 +563,10 @@ impl Processor {
563563
return Err(StakeError::InsufficientDelegation.into());
564564
}
565565

566-
set_stake_state(source_stake_account_info, &StakeStateV2::Uninitialized)?;
567566
set_stake_state(destination_stake_account_info, &destination_stake_state)?;
567+
if source_stake_account_info.key != destination_stake_account_info.key {
568+
source_stake_account_info.realloc(0, false)?;
569+
}
568570

569571
relocate_lamports(
570572
source_stake_account_info,

0 commit comments

Comments
 (0)