chore: rm reth-interfaces from stages-api (#8472)

This commit is contained in:
Matthias Seitz
2024-05-29 16:23:28 +02:00
committed by GitHub
parent bed246c0ac
commit bd59c1badd
5 changed files with 15 additions and 15 deletions

4
Cargo.lock generated
View File

@ -7994,12 +7994,14 @@ dependencies = [
"metrics",
"reth-consensus",
"reth-db",
"reth-interfaces",
"reth-errors",
"reth-metrics",
"reth-network-p2p",
"reth-primitives",
"reth-provider",
"reth-prune",
"reth-static-file",
"reth-testing-utils",
"reth-tokio-util",
"thiserror",
"tokio",

View File

@ -15,11 +15,12 @@ workspace = true
reth-primitives.workspace = true
reth-provider.workspace = true
reth-db.workspace = true
reth-interfaces.workspace = true
reth-static-file.workspace = true
reth-network-p2p.workspace = true
reth-tokio-util.workspace = true
reth-consensus.workspace = true
reth-prune.workspace = true
reth-errors.workspace = true
# metrics
reth-metrics.workspace = true
@ -38,8 +39,8 @@ auto_impl.workspace = true
[dev-dependencies]
assert_matches.workspace = true
reth-provider = { workspace = true, features = ["test-utils"] }
reth-interfaces = { workspace = true, features = ["test-utils"] }
tokio-stream.workspace = true
reth-testing-utils.workspace = true
[features]
test-utils = []

View File

@ -1,8 +1,7 @@
use crate::PipelineEvent;
use reth_consensus::ConsensusError;
use reth_interfaces::{
db::DatabaseError as DbError, executor, p2p::error::DownloadError, RethError,
};
use reth_errors::{BlockExecutionError, DatabaseError, RethError};
use reth_network_p2p::error::DownloadError;
use reth_primitives::{BlockNumber, SealedHeader, StaticFileSegment, TxNumber};
use reth_provider::ProviderError;
use thiserror::Error;
@ -16,7 +15,7 @@ pub enum BlockErrorKind {
Validation(#[from] ConsensusError),
/// The block encountered an execution error.
#[error("execution error: {0}")]
Execution(#[from] executor::BlockExecutionError),
Execution(#[from] BlockExecutionError),
}
impl BlockErrorKind {
@ -66,7 +65,7 @@ pub enum StageError {
MissingSyncGap,
/// The stage encountered a database error.
#[error("internal database error occurred: {0}")]
Database(#[from] DbError),
Database(#[from] DatabaseError),
/// Invalid pruning configuration
#[error(transparent)]
PruningConfiguration(#[from] reth_primitives::PruneSegmentError),
@ -167,7 +166,7 @@ pub enum PipelineError {
Stage(#[from] StageError),
/// The pipeline encountered a database error.
#[error(transparent)]
Database(#[from] DbError),
Database(#[from] DatabaseError),
/// Provider error.
#[error(transparent)]
Provider(#[from] ProviderError),

View File

@ -4,7 +4,6 @@ pub use crate::pipeline::ctrl::ControlFlow;
pub use event::*;
use futures_util::Future;
use reth_db::database::Database;
use reth_interfaces::RethResult;
use reth_primitives::{
constants::BEACON_CONSENSUS_REORG_UNWIND_DEPTH,
stage::{PipelineTarget, StageCheckpoint, StageId},
@ -32,6 +31,7 @@ use crate::{
};
pub use builder::*;
use progress::*;
use reth_errors::RethResult;
pub use set::*;
/// A container for a queued stage.
@ -589,12 +589,10 @@ mod tests {
use crate::{test_utils::TestStage, UnwindOutput};
use assert_matches::assert_matches;
use reth_consensus::ConsensusError;
use reth_interfaces::{
provider::ProviderError,
test_utils::{generators, generators::random_header},
};
use reth_errors::ProviderError;
use reth_primitives::PruneModes;
use reth_provider::test_utils::create_test_provider_factory;
use reth_testing_utils::{generators, generators::random_header};
use tokio_stream::StreamExt;
#[test]

View File

@ -29,7 +29,7 @@ pub use providers::{
pub mod test_utils;
/// Re-export provider error.
pub use reth_storage_errors::provider::ProviderError;
pub use reth_storage_errors::provider::{ProviderError, ProviderResult};
pub use reth_execution_types::*;