Skip to content

Commit 4fd8112

Browse files
committed
comments
1 parent d47b530 commit 4fd8112

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

crates/common/src/config/mux.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ impl PbsMuxes {
4141

4242
let mut configs = HashMap::new();
4343
// fill the configs using the default pbs config and relay entries
44-
for mux in self.muxes.into_iter() {
44+
for mux in self.muxes {
4545
ensure!(!mux.relays.is_empty(), "mux config must have at least one relay");
4646
ensure!(
4747
!mux.validator_pubkeys.is_empty(),

crates/common/src/config/pbs.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,11 @@ pub fn load_pbs_config() -> Result<PbsModuleConfig> {
144144
let config = CommitBoostConfig::from_env_path()?;
145145
config.validate()?;
146146

147-
let muxes = match config.muxes {
148-
Some(muxes) => Some(muxes.validate_and_fill(&config.pbs.pbs_config, &config.relays)?),
149-
None => None,
150-
};
147+
let muxes = config
148+
.muxes
149+
.map(|muxes| muxes.validate_and_fill(&config.pbs.pbs_config, &config.relays))
150+
.transpose()?;
151+
151152
let relay_clients =
152153
config.relays.into_iter().map(RelayClient::new).collect::<Result<Vec<_>>>()?;
153154
let maybe_publiher = BuilderEventPublisher::new_from_env()?;

0 commit comments

Comments
 (0)