@@ -1167,7 +1167,7 @@ impl Processor {
1167
1167
return Err ( StakePoolError :: InvalidState . into ( ) ) ;
1168
1168
}
1169
1169
1170
- let ( meta , stake) = get_stake_state ( stake_account_info) ?;
1170
+ let ( _ , stake) = get_stake_state ( stake_account_info) ?;
1171
1171
let vote_account_address = stake. delegation . voter_pubkey ;
1172
1172
let maybe_validator_stake_info = validator_list. find_mut :: < ValidatorStakeInfo , _ > ( |x| {
1173
1173
ValidatorStakeInfo :: memcmp_pubkey ( x, & vote_account_address)
@@ -1193,30 +1193,6 @@ impl Processor {
1193
1193
return Err ( StakePoolError :: ValidatorNotFound . into ( ) ) ;
1194
1194
}
1195
1195
1196
- let stake_lamports = * * stake_account_info. lamports . borrow ( ) ;
1197
- let stake_minimum_delegation = stake:: tools:: get_minimum_delegation ( ) ?;
1198
- let required_lamports = minimum_stake_lamports ( & meta, stake_minimum_delegation) ;
1199
- if stake_lamports > required_lamports {
1200
- msg ! (
1201
- "Attempting to remove validator account with {} lamports, must have no more than {} lamports; \
1202
- reduce using DecreaseValidatorStake first",
1203
- stake_lamports,
1204
- required_lamports
1205
- ) ;
1206
- return Err ( StakePoolError :: StakeLamportsNotEqualToMinimum . into ( ) ) ;
1207
- }
1208
-
1209
- let current_minimum_delegation = minimum_delegation ( stake_minimum_delegation) ;
1210
- if stake. delegation . stake > current_minimum_delegation {
1211
- msg ! (
1212
- "Error: attempting to remove stake with delegation of {} lamports, must have no more than {} lamports; \
1213
- reduce using DecreaseValidatorStake first",
1214
- stake. delegation. stake,
1215
- current_minimum_delegation
1216
- ) ;
1217
- return Err ( StakePoolError :: StakeLamportsNotEqualToMinimum . into ( ) ) ;
1218
- }
1219
-
1220
1196
let new_status = if validator_stake_info. transient_stake_lamports > 0 {
1221
1197
check_transient_stake_address (
1222
1198
program_id,
0 commit comments