Skip to content

Commit

Permalink
Merge pull request #434 from chainbound/sidecar-lint2
Browse files Browse the repository at this point in the history
chore(bolt-sidecar): fix lints
  • Loading branch information
thedevbirb authored Nov 27, 2024
2 parents 8ca1fe2 + dc87ba3 commit f436057
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
4 changes: 2 additions & 2 deletions bolt-sidecar/src/builder/payload_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,12 @@ impl FallbackPayloadBuilder {
latest_block.header.gas_limit,
latest_block.header.base_fee_per_gas.unwrap_or_default(),
BaseFeeParams::ethereum(),
) as u64;
);

let excess_blob_gas = calc_excess_blob_gas(
latest_block.header.excess_blob_gas.unwrap_or_default(),
latest_block.header.blob_gas_used.unwrap_or_default(),
) as u64;
);

let blob_gas_used =
transactions.iter().fold(0, |acc, tx| acc + tx.blob_gas_used().unwrap_or_default());
Expand Down
22 changes: 8 additions & 14 deletions bolt-sidecar/src/signer/commit_boost.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,12 @@ mod test {
async fn test_bls_commit_boost_signer() -> eyre::Result<()> {
let _ = dotenvy::dotenv();

let (signer_server_address, jwt_hex) = match (
let (Some(signer_server_address), Ok(jwt_hex)) = (
std::env::var("BOLT_SIDECAR_CB_SIGNER_URL").ok(),
std::env::var("BOLT_SIDECAR_CB_JWT_HEX"),
) {
(Some(address), Ok(hex)) => (address, hex),
_ => {
warn!("skipping test: commit-boost inputs are not set");
return Ok(());
}
) else {
warn!("skipping test: commit-boost inputs are not set");
return Ok(());
};
let signer = CommitBoostSigner::new(signer_server_address.parse()?, &jwt_hex).unwrap();

Expand All @@ -240,15 +237,12 @@ mod test {
async fn test_ecdsa_commit_boost_signer() -> eyre::Result<()> {
let _ = dotenvy::dotenv();

let (signer_server_address, jwt_hex) = match (
let (Some(signer_server_address), Ok(jwt_hex)) = (
std::env::var("BOLT_SIDECAR_CB_SIGNER_URL").ok(),
std::env::var("BOLT_SIDECAR_CB_JWT_HEX"),
) {
(Some(address), Ok(hex)) => (address, hex),
_ => {
warn!("skipping test: commit-boost inputs are not set");
return Ok(());
}
) else {
warn!("skipping test: commit-boost inputs are not set");
return Ok(());
};
let signer = CommitBoostSigner::new(signer_server_address.parse()?, &jwt_hex).unwrap();
let pubkey = signer.get_proxy_ecdsa_pubkey();
Expand Down

0 comments on commit f436057

Please sign in to comment.