mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
Changed "match" to "if let some" to fix build errors (#14637)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@ -54,7 +54,7 @@ pub struct TreeConfig {
|
|||||||
use_caching_and_prewarming: bool,
|
use_caching_and_prewarming: bool,
|
||||||
/// Cross-block cache size in bytes.
|
/// Cross-block cache size in bytes.
|
||||||
cross_block_cache_size: u64,
|
cross_block_cache_size: u64,
|
||||||
/// Wether the host has enough parallelism to run state root task.
|
/// Whether the host has enough parallelism to run state root task.
|
||||||
has_enough_parallelism: bool,
|
has_enough_parallelism: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -224,7 +224,7 @@ impl TreeConfig {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Wether or not to use state root task
|
/// Whether or not to use state root task
|
||||||
pub(crate) fn use_state_root_task(&self) -> bool {
|
pub(crate) fn use_state_root_task(&self) -> bool {
|
||||||
self.has_enough_parallelism && !self.legacy_state_root
|
self.has_enough_parallelism && !self.legacy_state_root
|
||||||
}
|
}
|
||||||
|
|||||||
@ -437,19 +437,11 @@ pub fn make_op_genesis_header(genesis: &Genesis, hardforks: &ChainHardforks) ->
|
|||||||
// If Isthmus is active, overwrite the withdrawals root with the storage root of predeploy
|
// If Isthmus is active, overwrite the withdrawals root with the storage root of predeploy
|
||||||
// `L2ToL1MessagePasser.sol`
|
// `L2ToL1MessagePasser.sol`
|
||||||
if hardforks.fork(OpHardfork::Isthmus).active_at_timestamp(header.timestamp) {
|
if hardforks.fork(OpHardfork::Isthmus).active_at_timestamp(header.timestamp) {
|
||||||
match genesis.alloc.get(&ADDRESS_L2_TO_L1_MESSAGE_PASSER) {
|
if let Some(predeploy) = genesis.alloc.get(&ADDRESS_L2_TO_L1_MESSAGE_PASSER) {
|
||||||
Some(predeploy) => {
|
if let Some(storage) = &predeploy.storage {
|
||||||
if let Some(ref storage) = predeploy.storage {
|
header.withdrawals_root =
|
||||||
header.withdrawals_root =
|
Some(storage_root_unhashed(storage.iter().map(|(k, v)| (*k, (*v).into()))))
|
||||||
Some(storage_root_unhashed(storage.iter().map(|(k, v)| (*k, (*v).into()))))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
None =>
|
|
||||||
// todo: log this when no_std tracing available <https://github.com/paradigmxyz/reth/issues/14526>
|
|
||||||
/*debug!(target: "reth::cli",
|
|
||||||
"Isthmus active but predeploy L2ToL1MessagePasser.sol not found in genesis alloc"
|
|
||||||
),*/
|
|
||||||
{}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user