StakePoolProgram.cleanupRemovedValidatorEntries constructor

StakePoolProgram.cleanupRemovedValidatorEntries({
  1. required SolAddress stakePool,
  2. required SolAddress validatorList,
})

Cleans up validator stake account entries marked as ReadyForRemoval

Implementation

factory StakePoolProgram.cleanupRemovedValidatorEntries({
  /// Stake pool
  required SolAddress stakePool,

  /// Validator stake list storage account
  required SolAddress validatorList,
}) {
  return StakePoolProgram(
      layout: const StakePoolCleanupRemovedValidatorEntriesLayout(),
      keys: [
        stakePool.toReadOnly(),
        validatorList.toWritable(),
      ],
      programId: StakePoolProgramConst.programId);
}