Skip to content

Commit fb3a5ad

Browse files
committed
feat: answer comment
Signed-off-by: Gregory Edison <[email protected]>
1 parent 4d55a25 commit fb3a5ad

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/scroll/consensus/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,3 @@ normal = ["reth-primitives"]
3838

3939
[dev-dependencies]
4040
reth-scroll-chainspec.workspace = true
41-
critical-section = { version = "1.0", features = ["std"] }

crates/scroll/consensus/src/validation.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ fn validate_against_parent_gas_limit<H: BlockHeader>(
322322
parent: &H,
323323
) -> Result<(), ConsensusError> {
324324
let diff = header.gas_limit().abs_diff(parent.gas_limit());
325-
let limit = parent.gas_limit().saturating_div(GAS_LIMIT_BOUND_DIVISOR);
325+
let limit = parent.gas_limit() / GAS_LIMIT_BOUND_DIVISOR;
326326
if diff > limit {
327327
return if header.gas_limit() > parent.gas_limit() {
328328
Err(ConsensusError::GasLimitInvalidIncrease {
@@ -377,6 +377,7 @@ fn validate_l1_messages<Tx: SignedTransaction + ScrollTransaction>(
377377
mod tests {
378378
use super::*;
379379
use crate::ScrollConsensusError;
380+
380381
use alloy_consensus::{Header, Signed, TxEip1559};
381382
use alloy_primitives::{b64, Address, Bloom, Bytes, Signature, B256, U256};
382383
use reth_consensus::ConsensusError;

0 commit comments

Comments
 (0)