From 632a20f47e9cdb541bf62df6a3044266b13bab90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20C=C3=A1rdenas?= Date: Wed, 18 Dec 2024 11:01:21 -0600 Subject: [PATCH] Update stackslib/src/config/mod.rs Co-authored-by: Jeff Bencin --- stackslib/src/config/mod.rs | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/stackslib/src/config/mod.rs b/stackslib/src/config/mod.rs index c8a33485033..010ecc16fd8 100644 --- a/stackslib/src/config/mod.rs +++ b/stackslib/src/config/mod.rs @@ -2676,18 +2676,9 @@ impl MinerConfigFile { activated_vrf_key_path: self.activated_vrf_key_path.clone(), fast_rampup: self.fast_rampup.unwrap_or(miner_default_config.fast_rampup), underperform_stop_threshold: self.underperform_stop_threshold, - mempool_walk_strategy: { - if let Some(mempool_walk_strategy) = &self.mempool_walk_strategy { - match str::parse(&mempool_walk_strategy) { - Ok(strategy) => strategy, - Err(e) => { - panic!("could not parse '{mempool_walk_strategy}': {e}"); - }, - } - } else { - MemPoolWalkStrategy::GlobalFeeRate - } - }, + mempool_walk_strategy: self.mempool_walk_strategy + .map(|s| str::parse(&s).unwrap_or_else(|e| panic!("Could not parse '{s}': {e}"))) + .unwrap_or(MemPoolWalkStrategy::GlobalFeeRate), txs_to_consider: { if let Some(txs_to_consider) = &self.txs_to_consider { txs_to_consider