primitives: rm more alloy_primitives reexports (#11250)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Thomas Coratger
2024-09-26 18:18:56 +02:00
committed by GitHub
parent 2e05ec008a
commit ad64de8962
19 changed files with 39 additions and 43 deletions

View File

@ -6,6 +6,7 @@ use std::{
use futures_util::TryStreamExt;
use tracing::*;
use alloy_primitives::TxNumber;
use reth_db::tables;
use reth_db_api::{
cursor::{DbCursorRO, DbCursorRW},
@ -13,7 +14,7 @@ use reth_db_api::{
transaction::DbTxMut,
};
use reth_network_p2p::bodies::{downloader::BodyDownloader, response::BlockResponse};
use reth_primitives::{StaticFileSegment, TxNumber};
use reth_primitives::StaticFileSegment;
use reth_provider::{
providers::{StaticFileProvider, StaticFileWriter},
BlockReader, DBProvider, ProviderError, StaticFileProviderFactory, StatsReader,
@ -621,7 +622,7 @@ mod tests {
UnwindStageTestRunner,
},
};
use alloy_primitives::{BlockHash, BlockNumber};
use alloy_primitives::{BlockHash, BlockNumber, TxNumber};
use futures_util::Stream;
use reth_db::{static_file::HeaderMask, tables};
use reth_db_api::{
@ -637,7 +638,7 @@ mod tests {
error::DownloadResult,
};
use reth_primitives::{
BlockBody, Header, SealedBlock, SealedHeader, StaticFileSegment, TxNumber, B256,
BlockBody, Header, SealedBlock, SealedHeader, StaticFileSegment, B256,
};
use reth_provider::{
providers::StaticFileWriter, test_utils::MockNodeTypesWithDB, HeaderProvider,

View File

@ -658,16 +658,14 @@ where
mod tests {
use super::*;
use crate::test_utils::TestStageDB;
use alloy_primitives::{keccak256, Address};
use alloy_primitives::{hex_literal::hex, keccak256, Address};
use alloy_rlp::Decodable;
use assert_matches::assert_matches;
use reth_chainspec::ChainSpecBuilder;
use reth_db_api::{models::AccountBeforeTx, transaction::DbTxMut};
use reth_evm_ethereum::execute::EthExecutorProvider;
use reth_execution_errors::BlockValidationError;
use reth_primitives::{
address, hex_literal::hex, Account, Bytecode, SealedBlock, StorageEntry, B256, U256,
};
use reth_primitives::{address, Account, Bytecode, SealedBlock, StorageEntry, B256, U256};
use reth_provider::{
test_utils::create_test_provider_factory, AccountReader, DatabaseProviderFactory,
ReceiptProvider, StaticFileProviderFactory,

View File

@ -42,7 +42,7 @@ use utils::*;
mod tests {
use super::*;
use crate::test_utils::{StorageKind, TestStageDB};
use alloy_primitives::{keccak256, BlockNumber};
use alloy_primitives::{hex_literal::hex, keccak256, BlockNumber};
use alloy_rlp::Decodable;
use reth_chainspec::ChainSpecBuilder;
use reth_db::{
@ -56,9 +56,7 @@ mod tests {
};
use reth_evm_ethereum::execute::EthExecutorProvider;
use reth_exex::ExExManagerHandle;
use reth_primitives::{
address, hex_literal::hex, Account, Bytecode, SealedBlock, StaticFileSegment, B256, U256,
};
use reth_primitives::{address, Account, Bytecode, SealedBlock, StaticFileSegment, B256, U256};
use reth_provider::{
providers::{StaticFileProvider, StaticFileWriter},
test_utils::MockNodeTypesWithDB,

View File

@ -1,4 +1,4 @@
use alloy_primitives::Address;
use alloy_primitives::{Address, TxNumber};
use reth_config::config::SenderRecoveryConfig;
use reth_consensus::ConsensusError;
use reth_db::{static_file::TransactionMask, tables, RawValue};
@ -7,7 +7,7 @@ use reth_db_api::{
transaction::{DbTx, DbTxMut},
DbTxUnwindExt,
};
use reth_primitives::{GotExpected, StaticFileSegment, TransactionSignedNoHash, TxNumber};
use reth_primitives::{GotExpected, StaticFileSegment, TransactionSignedNoHash};
use reth_provider::{
BlockReader, DBProvider, HeaderProvider, ProviderError, PruneCheckpointReader,
StaticFileProviderFactory, StatsReader,

View File

@ -1,3 +1,4 @@
use alloy_primitives::{TxHash, TxNumber};
use num_traits::Zero;
use reth_config::config::{EtlConfig, TransactionLookupConfig};
use reth_db::{tables, RawKey, RawValue};
@ -6,7 +7,6 @@ use reth_db_api::{
transaction::{DbTx, DbTxMut},
};
use reth_etl::Collector;
use reth_primitives::{TxHash, TxNumber};
use reth_provider::{
BlockReader, DBProvider, PruneCheckpointReader, PruneCheckpointWriter,
StaticFileProviderFactory, StatsReader, TransactionsProvider, TransactionsProviderExt,
@ -109,7 +109,7 @@ where
}
}
if input.target_reached() {
return Ok(ExecOutput::done(input.checkpoint()))
return Ok(ExecOutput::done(input.checkpoint()));
}
// 500MB temporary files
@ -172,7 +172,7 @@ where
"Transaction hashes inserted"
);
break
break;
}
}
@ -199,7 +199,7 @@ where
let mut rev_walker = body_cursor.walk_back(Some(*range.end()))?;
while let Some((number, body)) = rev_walker.next().transpose()? {
if number <= unwind_to {
break
break;
}
// Delete all transactions that belong to this block

View File

@ -1,4 +1,4 @@
use alloy_primitives::{keccak256, Address, BlockNumber};
use alloy_primitives::{keccak256, Address, BlockNumber, TxNumber};
use reth_chainspec::MAINNET;
use reth_db::{
tables,
@ -15,8 +15,8 @@ use reth_db_api::{
DatabaseError as DbError,
};
use reth_primitives::{
Account, Receipt, SealedBlock, SealedHeader, StaticFileSegment, StorageEntry, TxHash, TxNumber,
B256, U256,
Account, Receipt, SealedBlock, SealedHeader, StaticFileSegment, StorageEntry, TxHash, B256,
U256,
};
use reth_provider::{
providers::{StaticFileProvider, StaticFileProviderRWRefMut, StaticFileWriter},