Skip to content

Commit

Permalink
pr_comments: fix unwrap_or()
Browse files Browse the repository at this point in the history
  • Loading branch information
fborello-lambda committed Nov 13, 2024
1 parent b876fe2 commit 1bfc720
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
2 changes: 0 additions & 2 deletions crates/l2/proposer/prover_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,6 @@ impl ProverServer {

let block = Block::new(header, body);

info!("prover_server {block:?}");

let db = ExecutionDB::from_exec(&block, &self.store).map_err(|err| err.to_string())?;

let parent_header = self
Expand Down
22 changes: 15 additions & 7 deletions crates/l2/utils/eth_client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,11 @@ impl EthClient {
self.get_chain_id().await?.as_u64()
},
nonce: self.get_nonce_from_overrides(&overrides).await?,
max_priority_fee_per_gas: overrides
.priority_gas_price
.unwrap_or(self.get_gas_price().await?.as_u64()),
max_priority_fee_per_gas: if let Some(gas_price) = overrides.priority_gas_price {
gas_price
} else {
self.get_gas_price().await?.as_u64()
},
max_fee_per_gas: if let Some(gas_price) = overrides.gas_price {
gas_price
} else {
Expand Down Expand Up @@ -464,9 +466,11 @@ impl EthClient {
self.get_chain_id().await?.as_u64()
},
nonce: self.get_nonce_from_overrides(&overrides).await?,
max_priority_fee_per_gas: overrides
.priority_gas_price
.unwrap_or(self.get_gas_price().await?.as_u64()),
max_priority_fee_per_gas: if let Some(gas_price) = overrides.priority_gas_price {
gas_price
} else {
self.get_gas_price().await?.as_u64()
},
max_fee_per_gas: if let Some(gas_price) = overrides.gas_price {
gas_price
} else {
Expand Down Expand Up @@ -514,7 +518,11 @@ impl EthClient {
self.get_chain_id().await?.as_u64()
},
nonce: self.get_nonce_from_overrides(&overrides).await?,
max_priority_fee_per_gas: overrides.priority_gas_price.unwrap_or_default(),
max_priority_fee_per_gas: if let Some(gas_price) = overrides.priority_gas_price {
gas_price
} else {
self.get_gas_price().await?.as_u64()
},
max_fee_per_gas: if let Some(gas_price) = overrides.gas_price {
gas_price
} else {
Expand Down

0 comments on commit 1bfc720

Please sign in to comment.