Skip to content

Commit eb020e1

Browse files
authored
feat: update gas_limit field of ScrollBuilderConfig to a Option<u64> (#300)
* feat: update gas_limit field of ScrollBuilderConfig to a Option<u64> * cargo update
1 parent f451fe8 commit eb020e1

File tree

4 files changed

+74
-64
lines changed

4 files changed

+74
-64
lines changed

Cargo.lock

Lines changed: 52 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/scroll/node/src/builder/payload.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ impl<Txs> ScrollPayloadBuilderBuilder<Txs> {
7070
evm_config,
7171
ctx.provider().clone(),
7272
ScrollBuilderConfig::new(
73-
gas_limit,
73+
Some(gas_limit),
7474
self.payload_building_time_limit,
7575
self.block_da_size_limit,
7676
),

crates/scroll/payload/src/builder.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,10 @@ where
414414
ScrollNextBlockEnvAttributes {
415415
timestamp: self.attributes().timestamp(),
416416
suggested_fee_recipient: self.attributes().suggested_fee_recipient(),
417-
gas_limit: self.attributes().gas_limit.unwrap_or(builder_config.gas_limit),
417+
gas_limit: self
418+
.attributes()
419+
.gas_limit
420+
.unwrap_or_else(|| builder_config.gas_limit.unwrap_or_default()),
418421
base_fee,
419422
},
420423
)

0 commit comments

Comments
 (0)