From 4d3cd2f2485d3be66c9253ee292d8f68a61c785b Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Wed, 8 Jan 2025 14:40:18 +0100 Subject: [PATCH] chore: rm blockchaintree dep from errors (#13730) --- Cargo.lock | 1 - crates/errors/Cargo.toml | 1 - crates/errors/src/error.rs | 14 +------------- crates/errors/src/lib.rs | 1 - 4 files changed, 1 insertion(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 23c3eabb2..4eb6c84ec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7271,7 +7271,6 @@ dependencies = [ name = "reth-errors" version = "1.1.5" dependencies = [ - "reth-blockchain-tree-api", "reth-consensus", "reth-execution-errors", "reth-fs-util", diff --git a/crates/errors/Cargo.toml b/crates/errors/Cargo.toml index bb56a8bac..11ecd7084 100644 --- a/crates/errors/Cargo.toml +++ b/crates/errors/Cargo.toml @@ -11,7 +11,6 @@ repository.workspace = true workspace = true [dependencies] -reth-blockchain-tree-api.workspace = true reth-consensus.workspace = true reth-execution-errors.workspace = true reth-fs-util.workspace = true diff --git a/crates/errors/src/error.rs b/crates/errors/src/error.rs index 2d97572f5..5141a7457 100644 --- a/crates/errors/src/error.rs +++ b/crates/errors/src/error.rs @@ -1,4 +1,3 @@ -use reth_blockchain_tree_api::error::{BlockchainTreeError, CanonicalError}; use reth_consensus::ConsensusError; use reth_execution_errors::BlockExecutionError; use reth_fs_util::FsPathError; @@ -31,10 +30,6 @@ pub enum RethError { #[error(transparent)] Provider(#[from] ProviderError), - /// Canonical errors encountered. - #[error(transparent)] - Canonical(#[from] CanonicalError), - /// Any other error. #[error(transparent)] Other(Box), @@ -55,12 +50,6 @@ impl RethError { } } -impl From for RethError { - fn from(error: BlockchainTreeError) -> Self { - Self::Canonical(CanonicalError::BlockchainTree(error)) - } -} - impl From for RethError { fn from(err: FsPathError) -> Self { Self::other(err) @@ -78,10 +67,9 @@ mod size_asserts { }; } - static_assert_size!(RethError, 64); + static_assert_size!(RethError, 56); static_assert_size!(BlockExecutionError, 56); static_assert_size!(ConsensusError, 48); static_assert_size!(DatabaseError, 32); static_assert_size!(ProviderError, 48); - static_assert_size!(CanonicalError, 56); } diff --git a/crates/errors/src/lib.rs b/crates/errors/src/lib.rs index 9dc0ce0ca..fc464eb98 100644 --- a/crates/errors/src/lib.rs +++ b/crates/errors/src/lib.rs @@ -15,7 +15,6 @@ mod error; pub use error::{RethError, RethResult}; -pub use reth_blockchain_tree_api::error::{BlockchainTreeError, CanonicalError}; pub use reth_consensus::ConsensusError; pub use reth_execution_errors::{BlockExecutionError, BlockValidationError}; pub use reth_storage_errors::{