From 15c461236b232fdb12c51e962069e67e616216ed Mon Sep 17 00:00:00 2001 From: Alex Bundy Date: Thu, 18 Jan 2024 13:29:26 -0800 Subject: [PATCH] Disable stake pool application for testnet --- bot/src/main.rs | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/bot/src/main.rs b/bot/src/main.rs index 9e47be44..cd1bbd7c 100644 --- a/bot/src/main.rs +++ b/bot/src/main.rs @@ -2572,16 +2572,27 @@ fn main() -> BoxResult<()> { ); let (stake_pool_notes, validator_stake_actions, unfunded_validators, bonus_stake_amount) = - stake_pool.apply( - cluster_multi_client, - pre_run_dry_run || config.dry_run, - &desired_validator_stake, - if config.cluster == Testnet { - Some(0.85) - } else { - None - }, - )?; + match config.cluster { + Testnet => { + // Don't apply stake pool for Testnet. We only care about None/Baseline/Bonus values + ( + vec!["No stake distribution for Testnet".to_string()], + ValidatorStakeActions::new(), + UnfundedValidators::new(), + 42_000 * LAMPORTS_PER_SOL, + ) + } + MainnetBeta => stake_pool.apply( + cluster_multi_client, + pre_run_dry_run || config.dry_run, + &desired_validator_stake, + if config.cluster == Testnet { + Some(0.85) + } else { + None + }, + )?, + }; let mut summary_messages: Vec = vec![format!( "summary for {:?}/{:?}\n",