@@ -499,7 +499,7 @@ fn command_vsa_remove(
499
499
. find ( vote_account)
500
500
. ok_or ( "Vote account not found in validator list" ) ?;
501
501
502
- let validator_seed = NonZeroU32 :: new ( validator_stake_info. validator_seed_suffix ) ;
502
+ let validator_seed = NonZeroU32 :: new ( validator_stake_info. validator_seed_suffix . into ( ) ) ;
503
503
let ( stake_account_address, _) = find_stake_program_address (
504
504
& spl_stake_pool:: id ( ) ,
505
505
vote_account,
@@ -520,7 +520,7 @@ fn command_vsa_remove(
520
520
stake_pool_address,
521
521
vote_account,
522
522
validator_seed,
523
- validator_stake_info. transient_seed_suffix,
523
+ validator_stake_info. transient_seed_suffix. into ( ) ,
524
524
) ,
525
525
] ;
526
526
unique_signers ! ( signers) ;
@@ -545,7 +545,7 @@ fn command_increase_validator_stake(
545
545
let validator_stake_info = validator_list
546
546
. find ( vote_account)
547
547
. ok_or ( "Vote account not found in validator list" ) ?;
548
- let validator_seed = NonZeroU32 :: new ( validator_stake_info. validator_seed_suffix ) ;
548
+ let validator_seed = NonZeroU32 :: new ( validator_stake_info. validator_seed_suffix . into ( ) ) ;
549
549
550
550
let mut signers = vec ! [ config. fee_payer. as_ref( ) , config. staker. as_ref( ) ] ;
551
551
unique_signers ! ( signers) ;
@@ -559,7 +559,7 @@ fn command_increase_validator_stake(
559
559
vote_account,
560
560
lamports,
561
561
validator_seed,
562
- validator_stake_info. transient_seed_suffix ,
562
+ validator_stake_info. transient_seed_suffix . into ( ) ,
563
563
) ,
564
564
] ,
565
565
& signers,
@@ -584,7 +584,7 @@ fn command_decrease_validator_stake(
584
584
let validator_stake_info = validator_list
585
585
. find ( vote_account)
586
586
. ok_or ( "Vote account not found in validator list" ) ?;
587
- let validator_seed = NonZeroU32 :: new ( validator_stake_info. validator_seed_suffix ) ;
587
+ let validator_seed = NonZeroU32 :: new ( validator_stake_info. validator_seed_suffix . into ( ) ) ;
588
588
589
589
let mut signers = vec ! [ config. fee_payer. as_ref( ) , config. staker. as_ref( ) ] ;
590
590
unique_signers ! ( signers) ;
@@ -598,7 +598,7 @@ fn command_decrease_validator_stake(
598
598
vote_account,
599
599
lamports,
600
600
validator_seed,
601
- validator_stake_info. transient_seed_suffix ,
601
+ validator_stake_info. transient_seed_suffix . into ( ) ,
602
602
) ,
603
603
] ,
604
604
& signers,
@@ -692,7 +692,7 @@ fn command_deposit_stake(
692
692
let validator_stake_info = validator_list
693
693
. find ( & vote_account)
694
694
. ok_or ( "Vote account not found in the stake pool" ) ?;
695
- let validator_seed = NonZeroU32 :: new ( validator_stake_info. validator_seed_suffix ) ;
695
+ let validator_seed = NonZeroU32 :: new ( validator_stake_info. validator_seed_suffix . into ( ) ) ;
696
696
697
697
// Calculate validator stake account address linked to the pool
698
698
let ( validator_stake_account, _) = find_stake_program_address (
@@ -872,7 +872,7 @@ fn command_deposit_all_stake(
872
872
let validator_stake_info = validator_list
873
873
. find ( & vote_account)
874
874
. ok_or ( "Vote account not found in the stake pool" ) ?;
875
- let validator_seed = NonZeroU32 :: new ( validator_stake_info. validator_seed_suffix ) ;
875
+ let validator_seed = NonZeroU32 :: new ( validator_stake_info. validator_seed_suffix . into ( ) ) ;
876
876
877
877
// Calculate validator stake account address linked to the pool
878
878
let ( validator_stake_account, _) = find_stake_program_address (
@@ -1084,7 +1084,7 @@ fn command_list(config: &Config, stake_pool_address: &Pubkey) -> CommandResult {
1084
1084
. validators
1085
1085
. iter ( )
1086
1086
. map ( |validator| {
1087
- let validator_seed = NonZeroU32 :: new ( validator. validator_seed_suffix ) ;
1087
+ let validator_seed = NonZeroU32 :: new ( validator. validator_seed_suffix . into ( ) ) ;
1088
1088
let ( stake_account_address, _) = find_stake_program_address (
1089
1089
& spl_stake_pool:: id ( ) ,
1090
1090
& validator. vote_account_address ,
@@ -1095,18 +1095,18 @@ fn command_list(config: &Config, stake_pool_address: &Pubkey) -> CommandResult {
1095
1095
& spl_stake_pool:: id ( ) ,
1096
1096
& validator. vote_account_address ,
1097
1097
stake_pool_address,
1098
- validator. transient_seed_suffix ,
1098
+ validator. transient_seed_suffix . into ( ) ,
1099
1099
) ;
1100
- let update_required = validator. last_update_epoch != epoch_info. epoch ;
1100
+ let update_required = u64 :: from ( validator. last_update_epoch ) != epoch_info. epoch ;
1101
1101
CliStakePoolStakeAccountInfo {
1102
1102
vote_account_address : validator. vote_account_address . to_string ( ) ,
1103
1103
stake_account_address : stake_account_address. to_string ( ) ,
1104
- validator_active_stake_lamports : validator. active_stake_lamports ,
1105
- validator_last_update_epoch : validator. last_update_epoch ,
1104
+ validator_active_stake_lamports : validator. active_stake_lamports . into ( ) ,
1105
+ validator_last_update_epoch : validator. last_update_epoch . into ( ) ,
1106
1106
validator_lamports : validator. stake_lamports ( ) . unwrap ( ) ,
1107
1107
validator_transient_stake_account_address : transient_stake_account_address
1108
1108
. to_string ( ) ,
1109
- validator_transient_stake_lamports : validator. transient_stake_lamports ,
1109
+ validator_transient_stake_lamports : validator. transient_stake_lamports . into ( ) ,
1110
1110
update_required,
1111
1111
}
1112
1112
} )
@@ -1255,7 +1255,7 @@ fn prepare_withdraw_accounts(
1255
1255
& validator_list,
1256
1256
stake_pool,
1257
1257
|validator| {
1258
- let validator_seed = NonZeroU32 :: new ( validator. validator_seed_suffix ) ;
1258
+ let validator_seed = NonZeroU32 :: new ( validator. validator_seed_suffix . into ( ) ) ;
1259
1259
let ( stake_account_address, _) = find_stake_program_address (
1260
1260
& spl_stake_pool:: id ( ) ,
1261
1261
& validator. vote_account_address ,
@@ -1265,7 +1265,7 @@ fn prepare_withdraw_accounts(
1265
1265
1266
1266
(
1267
1267
stake_account_address,
1268
- validator. active_stake_lamports ,
1268
+ validator. active_stake_lamports . into ( ) ,
1269
1269
Some ( validator. vote_account_address ) ,
1270
1270
)
1271
1271
} ,
@@ -1279,14 +1279,12 @@ fn prepare_withdraw_accounts(
1279
1279
& spl_stake_pool:: id ( ) ,
1280
1280
& validator. vote_account_address ,
1281
1281
stake_pool_address,
1282
- validator. transient_seed_suffix ,
1282
+ validator. transient_seed_suffix . into ( ) ,
1283
1283
) ;
1284
1284
1285
1285
(
1286
1286
transient_stake_account_address,
1287
- validator
1288
- . transient_stake_lamports
1289
- . saturating_sub ( min_balance) ,
1287
+ u64:: from ( validator. transient_stake_lamports ) . saturating_sub ( min_balance) ,
1290
1288
Some ( validator. vote_account_address ) ,
1291
1289
)
1292
1290
} ,
@@ -1438,7 +1436,7 @@ fn command_withdraw_stake(
1438
1436
let validator_stake_info = validator_list
1439
1437
. find ( & vote_account)
1440
1438
. ok_or ( format ! ( "Provided stake account is delegated to a vote account {} which does not exist in the stake pool" , vote_account) ) ?;
1441
- let validator_seed = NonZeroU32 :: new ( validator_stake_info. validator_seed_suffix ) ;
1439
+ let validator_seed = NonZeroU32 :: new ( validator_stake_info. validator_seed_suffix . into ( ) ) ;
1442
1440
let ( stake_account_address, _) = find_stake_program_address (
1443
1441
& spl_stake_pool:: id ( ) ,
1444
1442
& vote_account,
@@ -1474,7 +1472,7 @@ fn command_withdraw_stake(
1474
1472
"Provided vote account address {} does not exist in the stake pool" ,
1475
1473
vote_account_address
1476
1474
) ) ?;
1477
- let validator_seed = NonZeroU32 :: new ( validator_stake_info. validator_seed_suffix ) ;
1475
+ let validator_seed = NonZeroU32 :: new ( validator_stake_info. validator_seed_suffix . into ( ) ) ;
1478
1476
let ( stake_account_address, _) = find_stake_program_address (
1479
1477
& spl_stake_pool:: id ( ) ,
1480
1478
vote_account_address,
0 commit comments