Skip to content

Commit acc5932

Browse files
committed
fmt
1 parent be4249a commit acc5932

4 files changed

Lines changed: 16 additions & 11 deletions

File tree

crates/common/src/config/pbs.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,9 @@ pub struct PbsModuleConfig {
173173
pub pbs_config: Arc<PbsConfig>,
174174
/// List of default relays
175175
pub relays: Vec<RelayClient>,
176-
/// List of all default relays plus additional relays from muxes (based on URL)
177-
/// DO NOT use this for get_header calls, use `relays` or `muxes` instead
176+
/// List of all default relays plus additional relays from muxes (based on
177+
/// URL) DO NOT use this for get_header calls, use `relays` or `muxes`
178+
/// instead
178179
pub all_relays: Vec<RelayClient>,
179180
/// Signer client to call Signer API
180181
pub signer_client: Option<SignerClient>,
@@ -222,8 +223,9 @@ pub async fn load_pbs_config() -> Result<PbsModuleConfig> {
222223
}
223224

224225
// insert default relays after to make sure we keep these as defaults,
225-
// this means we override timing games which is ok since this won't be used for get_header
226-
// we also override headers if the same relays has two definitions (in muxes and default)
226+
// this means we override timing games which is ok since this won't be used for
227+
// get_header we also override headers if the same relays has two
228+
// definitions (in muxes and default)
227229
for relay in relay_clients.iter() {
228230
all_relays.insert(&relay.config.entry.url, relay.clone());
229231
}
@@ -297,8 +299,9 @@ pub async fn load_pbs_custom_config<T: DeserializeOwned>() -> Result<(PbsModuleC
297299
}
298300

299301
// insert default relays after to make sure we keep these as defaults,
300-
// this also means we override timing games which is ok since this won't be used for get header
301-
// we also override headers if the same relays has two definitions (in muxes and default)
302+
// this also means we override timing games which is ok since this won't be used
303+
// for get header we also override headers if the same relays has two
304+
// definitions (in muxes and default)
302305
for relay in relay_clients.iter() {
303306
all_relays.insert(&relay.config.entry.url, relay.clone());
304307
}

crates/common/src/pbs/relay.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ impl<'de> Deserialize<'de> for RelayEntry {
5050
}
5151
}
5252

53-
/// A client to interact with a relay, safe to share across threads and cheaply cloneable
53+
/// A client to interact with a relay, safe to share across threads and cheaply
54+
/// cloneable
5455
#[derive(Debug, Clone)]
5556
pub struct RelayClient {
5657
/// ID of the relay

crates/pbs/src/mev_boost/submit_block.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,9 @@ async fn send_submit_block(
177177

178178
if let Some(blobs) = &block_response.data.blobs_bundle {
179179
let expected_committments = &signed_blinded_block.message.body.blob_kzg_commitments;
180-
if expected_committments.len() != blobs.blobs.len()
181-
|| expected_committments.len() != blobs.commitments.len()
182-
|| expected_committments.len() != blobs.proofs.len()
180+
if expected_committments.len() != blobs.blobs.len() ||
181+
expected_committments.len() != blobs.commitments.len() ||
182+
expected_committments.len() != blobs.proofs.len()
183183
{
184184
return Err(PbsError::Validation(ValidationError::KzgCommitments {
185185
expected_blobs: expected_committments.len(),

crates/pbs/src/state.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ where
4444
}
4545

4646
/// Returns all the relays (including those in muxes)
47-
/// DO NOT use this through the PBS module, use [`PbsState::mux_config_and_relays`] instead
47+
/// DO NOT use this through the PBS module, use
48+
/// [`PbsState::mux_config_and_relays`] instead
4849
pub fn all_relays(&self) -> &[RelayClient] {
4950
&self.config.all_relays
5051
}

0 commit comments

Comments
 (0)