Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
clabby committed Nov 14, 2024
1 parent ef349b1 commit e2a4e99
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions crates/executor/src/db/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub use traits::{NoopTrieDBProvider, TrieDBProvider};
/// use alloy_consensus::{Header, Sealable};
/// use alloy_primitives::{Bytes, B256};
/// use anyhow::Result;
/// use kona_executor::{TrieDB, NoopTrieDBProvider};
/// use kona_executor::{NoopTrieDBProvider, TrieDB};
/// use kona_mpt::NoopTrieHinter;
/// use revm::{db::states::bundle_state::BundleRetention, EvmBuilder, StateBuilder};
///
Expand Down Expand Up @@ -367,8 +367,8 @@ where
let mut header = self.parent_block_header.inner().clone();

// Check if the block number is in range. If not, we can fail early.
if block_number > header.number
|| header.number.saturating_sub(block_number) > BLOCK_HASH_HISTORY
if block_number > header.number ||
header.number.saturating_sub(block_number) > BLOCK_HASH_HISTORY
{
return Ok(B256::default());
}
Expand Down
4 changes: 2 additions & 2 deletions crates/executor/src/db/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use alloy_consensus::Header;
use alloy_primitives::{Bytes, B256};
use kona_mpt::{TrieNode, TrieProvider};

/// The [TrieDBProvider] trait defines the synchronous interface for fetching EVM bytecode hash preimages
/// as well as [Header] preimages.
/// The [TrieDBProvider] trait defines the synchronous interface for fetching EVM bytecode hash
/// preimages as well as [Header] preimages.
pub trait TrieDBProvider: TrieProvider {
/// Fetches the preimage of the bytecode hash provided.
///
Expand Down
2 changes: 1 addition & 1 deletion crates/executor/src/executor/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ where
{
/// The [RollupConfig].
config: &'a RollupConfig,
/// The [TrieProvider] to fetch the state trie preimages.
/// The [TrieDBProvider] to fetch the state trie preimages.
provider: F,
/// The [TrieHinter] to hint the state trie preimages.
hinter: H,
Expand Down
4 changes: 2 additions & 2 deletions crates/executor/src/executor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ where
// The sum of the transaction’s gas limit, Tg, and the gas utilized in this block prior,
// must be no greater than the block’s gasLimit.
let block_available_gas = (gas_limit - cumulative_gas_used) as u128;
if (transaction.gas_limit() as u128) > block_available_gas
&& (is_regolith || !transaction.is_system_transaction())
if (transaction.gas_limit() as u128) > block_available_gas &&
(is_regolith || !transaction.is_system_transaction())
{
return Err(ExecutorError::BlockGasLimitExceeded);
}
Expand Down
2 changes: 1 addition & 1 deletion crates/executor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ mod executor;
pub use executor::{KonaHandleRegister, StatelessL2BlockExecutor, StatelessL2BlockExecutorBuilder};

mod db;
pub use db::{TrieAccount, TrieDB, TrieDBProvider, NoopTrieDBProvider};
pub use db::{NoopTrieDBProvider, TrieAccount, TrieDB, TrieDBProvider};

mod constants;
mod syscalls;
4 changes: 2 additions & 2 deletions crates/executor/src/syscalls/canyon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ where
{
// If the canyon hardfork is active at the current timestamp, and it was not active at the
// previous block timestamp, then we need to force-deploy the create2 deployer contract.
if config.is_canyon_active(timestamp)
&& !config.is_canyon_active(db.database.parent_block_header().timestamp)
if config.is_canyon_active(timestamp) &&
!config.is_canyon_active(db.database.parent_block_header().timestamp)
{
// Load the create2 deployer account from the cache.
let acc = db.load_cache_account(CREATE_2_DEPLOYER_ADDR)?;
Expand Down

0 comments on commit e2a4e99

Please sign in to comment.