Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
tcoratger committed Jun 11, 2024
1 parent 1bd67d3 commit 03df3e2
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 29 deletions.
4 changes: 1 addition & 3 deletions crates/consensus/auto-seal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ use reth_primitives::{
ChainSpec, Header, Requests, SealedBlock, SealedHeader, TransactionSigned, Withdrawals, B256,
U256,
};
use reth_provider::{
ExecutionOutcome, BlockReaderIdExt, StateProviderFactory, StateRootProvider,
};
use reth_provider::{BlockReaderIdExt, ExecutionOutcome, StateProviderFactory, StateRootProvider};
use reth_revm::database::StateProviderDatabase;
use reth_transaction_pool::TransactionPool;
use std::{
Expand Down
11 changes: 3 additions & 8 deletions crates/optimism/payload/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -506,21 +506,16 @@ where
// and 4788 contract call
db.merge_transitions(BundleRetention::PlainState);

let execution_outcome = ExecutionOutcome::new(
db.take_bundle(),
vec![receipts].into(),
block_number,
Vec::new(),
);
let execution_outcome =
ExecutionOutcome::new(db.take_bundle(), vec![receipts].into(), block_number, Vec::new());
let receipts_root = execution_outcome
.optimism_receipts_root_slow(
block_number,
chain_spec.as_ref(),
attributes.payload_attributes.timestamp,
)
.expect("Number is in range");
let logs_bloom =
execution_outcome.block_logs_bloom(block_number).expect("Number is in range");
let logs_bloom = execution_outcome.block_logs_bloom(block_number).expect("Number is in range");

// calculate the state root
let state_root = {
Expand Down
2 changes: 1 addition & 1 deletion crates/stages/stages/src/stages/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use reth_exex::{ExExManagerHandle, ExExNotification};
use reth_primitives::{BlockNumber, Header, StaticFileSegment};
use reth_provider::{
providers::{StaticFileProvider, StaticFileProviderRWRefMut, StaticFileWriter},
ExecutionOutcome, BlockReader, Chain, DatabaseProviderRW, HeaderProvider,
BlockReader, Chain, DatabaseProviderRW, ExecutionOutcome, HeaderProvider,
LatestStateProviderRef, OriginalValuesKnown, ProviderError, StateWriter, StatsReader,
TransactionVariant,
};
Expand Down
2 changes: 1 addition & 1 deletion crates/stages/stages/src/stages/headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ mod tests {
use assert_matches::assert_matches;
use reth_primitives::{BlockBody, SealedBlock, SealedBlockWithSenders, B256};
use reth_provider::{
ExecutionOutcome, BlockWriter, ProviderFactory, StaticFileProviderFactory,
BlockWriter, ExecutionOutcome, ProviderFactory, StaticFileProviderFactory,
};
use reth_stages_api::StageUnitCheckpoint;
use reth_testing_utils::generators::{self, random_header, random_header_range};
Expand Down
7 changes: 3 additions & 4 deletions crates/storage/provider/src/test_utils/mock.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
use crate::{
traits::{BlockSource, ReceiptProvider},
AccountReader, BlockHashReader, BlockIdReader, BlockNumReader, BlockReader, BlockReaderIdExt,
ChainSpecProvider, ChangeSetReader, EvmEnvProvider, FullExecutionDataProvider,
HeaderProvider, ReceiptProviderIdExt, RequestsProvider, StateProvider, StateProviderBox,
StateProviderFactory, StateRootProvider, TransactionVariant, TransactionsProvider,
WithdrawalsProvider,
ChainSpecProvider, ChangeSetReader, EvmEnvProvider, FullExecutionDataProvider, HeaderProvider,
ReceiptProviderIdExt, RequestsProvider, StateProvider, StateProviderBox, StateProviderFactory,
StateRootProvider, TransactionVariant, TransactionsProvider, WithdrawalsProvider,
};
use parking_lot::Mutex;
use reth_db_api::models::{AccountBeforeTx, StoredBlockBodyIndices};
Expand Down
10 changes: 2 additions & 8 deletions crates/storage/storage-api/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,6 @@ pub trait BlockExecutionForkProvider {
/// * `ExecutionOutcome`: Contains all changes to accounts and storage within the pending chain.
/// * Block hashes: Represents hashes of both the pending chain and canonical blocks.
/// * Canonical fork: Denotes the block from which the pending chain forked.
pub trait FullExecutionDataProvider:
ExecutionDataProvider + BlockExecutionForkProvider
{
}
pub trait FullExecutionDataProvider: ExecutionDataProvider + BlockExecutionForkProvider {}

impl<T> FullExecutionDataProvider for T where
T: ExecutionDataProvider + BlockExecutionForkProvider
{
}
impl<T> FullExecutionDataProvider for T where T: ExecutionDataProvider + BlockExecutionForkProvider {}
4 changes: 2 additions & 2 deletions crates/transaction-pool/src/maintain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ use reth_primitives::{
TryFromRecoveredTransaction,
};
use reth_provider::{
ExecutionOutcome, BlockReaderIdExt, CanonStateNotification, ChainSpecProvider,
ProviderError, StateProviderFactory,
BlockReaderIdExt, CanonStateNotification, ChainSpecProvider, ExecutionOutcome, ProviderError,
StateProviderFactory,
};
use reth_tasks::TaskSpawner;
use std::{
Expand Down
2 changes: 1 addition & 1 deletion examples/exex/minimal/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ fn main() -> eyre::Result<()> {

#[cfg(test)]
mod tests {
use reth::providers::{ExecutionOutcome, Chain};
use reth::providers::{Chain, ExecutionOutcome};
use reth_exex_test_utils::{test_exex_context, PollOnce};
use std::pin::pin;

Expand Down
2 changes: 1 addition & 1 deletion examples/exex/op-bridge/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ mod tests {
Address, Block, Header, Log, Receipt, Transaction, TransactionSigned, TxKind, TxLegacy,
TxType, U256,
};
use reth_provider::{ExecutionOutcome, Chain};
use reth_provider::{Chain, ExecutionOutcome};
use reth_testing_utils::generators::sign_tx_with_random_key_pair;
use rusqlite::Connection;

Expand Down

0 comments on commit 03df3e2

Please sign in to comment.