mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: replace interfaces dep with storage-errors (#8384)
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -6646,6 +6646,7 @@ dependencies = [
|
|||||||
"reth-metrics",
|
"reth-metrics",
|
||||||
"reth-nippy-jar",
|
"reth-nippy-jar",
|
||||||
"reth-primitives",
|
"reth-primitives",
|
||||||
|
"reth-storage-errors",
|
||||||
"reth-tracing",
|
"reth-tracing",
|
||||||
"rustc-hash",
|
"rustc-hash",
|
||||||
"serde",
|
"serde",
|
||||||
|
|||||||
@ -15,7 +15,7 @@ workspace = true
|
|||||||
# reth
|
# reth
|
||||||
reth-primitives.workspace = true
|
reth-primitives.workspace = true
|
||||||
reth-fs-util.workspace = true
|
reth-fs-util.workspace = true
|
||||||
reth-interfaces.workspace = true
|
reth-storage-errors.workspace = true
|
||||||
reth-codecs.workspace = true
|
reth-codecs.workspace = true
|
||||||
reth-libmdbx = { workspace = true, optional = true, features = [
|
reth-libmdbx = { workspace = true, optional = true, features = [
|
||||||
"return-borrowed",
|
"return-borrowed",
|
||||||
|
|||||||
@ -11,8 +11,8 @@ use crate::{
|
|||||||
tables::utils::*,
|
tables::utils::*,
|
||||||
DatabaseError,
|
DatabaseError,
|
||||||
};
|
};
|
||||||
use reth_interfaces::db::{DatabaseErrorInfo, DatabaseWriteError, DatabaseWriteOperation};
|
|
||||||
use reth_libmdbx::{Error as MDBXError, TransactionKind, WriteFlags, RO, RW};
|
use reth_libmdbx::{Error as MDBXError, TransactionKind, WriteFlags, RO, RW};
|
||||||
|
use reth_storage_errors::db::{DatabaseErrorInfo, DatabaseWriteError, DatabaseWriteOperation};
|
||||||
use std::{borrow::Cow, collections::Bound, marker::PhantomData, ops::RangeBounds, sync::Arc};
|
use std::{borrow::Cow, collections::Bound, marker::PhantomData, ops::RangeBounds, sync::Arc};
|
||||||
|
|
||||||
/// Read only Cursor.
|
/// Read only Cursor.
|
||||||
|
|||||||
@ -13,11 +13,11 @@ use crate::{
|
|||||||
};
|
};
|
||||||
use eyre::Context;
|
use eyre::Context;
|
||||||
use metrics::{gauge, Label};
|
use metrics::{gauge, Label};
|
||||||
use reth_interfaces::db::LogLevel;
|
|
||||||
use reth_libmdbx::{
|
use reth_libmdbx::{
|
||||||
DatabaseFlags, Environment, EnvironmentFlags, Geometry, MaxReadTransactionDuration, Mode,
|
DatabaseFlags, Environment, EnvironmentFlags, Geometry, MaxReadTransactionDuration, Mode,
|
||||||
PageSize, SyncMode, RO, RW,
|
PageSize, SyncMode, RO, RW,
|
||||||
};
|
};
|
||||||
|
use reth_storage_errors::db::LogLevel;
|
||||||
use reth_tracing::tracing::error;
|
use reth_tracing::tracing::error;
|
||||||
use std::{
|
use std::{
|
||||||
ops::Deref,
|
ops::Deref,
|
||||||
@ -455,9 +455,9 @@ mod tests {
|
|||||||
test_utils::*,
|
test_utils::*,
|
||||||
AccountChangeSets,
|
AccountChangeSets,
|
||||||
};
|
};
|
||||||
use reth_interfaces::db::{DatabaseWriteError, DatabaseWriteOperation};
|
|
||||||
use reth_libmdbx::Error;
|
use reth_libmdbx::Error;
|
||||||
use reth_primitives::{Account, Address, Header, IntegerList, StorageEntry, B256, U256};
|
use reth_primitives::{Account, Address, Header, IntegerList, StorageEntry, B256, U256};
|
||||||
|
use reth_storage_errors::db::{DatabaseWriteError, DatabaseWriteOperation};
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
use tempfile::TempDir;
|
use tempfile::TempDir;
|
||||||
|
|
||||||
|
|||||||
@ -9,8 +9,8 @@ use crate::{
|
|||||||
DatabaseError,
|
DatabaseError,
|
||||||
};
|
};
|
||||||
use once_cell::sync::OnceCell;
|
use once_cell::sync::OnceCell;
|
||||||
use reth_interfaces::db::{DatabaseWriteError, DatabaseWriteOperation};
|
|
||||||
use reth_libmdbx::{ffi::DBI, CommitLatency, Transaction, TransactionKind, WriteFlags, RW};
|
use reth_libmdbx::{ffi::DBI, CommitLatency, Transaction, TransactionKind, WriteFlags, RW};
|
||||||
|
use reth_storage_errors::db::{DatabaseWriteError, DatabaseWriteOperation};
|
||||||
use reth_tracing::tracing::{debug, trace, warn};
|
use reth_tracing::tracing::{debug, trace, warn};
|
||||||
use std::{
|
use std::{
|
||||||
backtrace::Backtrace,
|
backtrace::Backtrace,
|
||||||
@ -395,8 +395,8 @@ mod tests {
|
|||||||
database::Database, mdbx::DatabaseArguments, models::client_version::ClientVersion, tables,
|
database::Database, mdbx::DatabaseArguments, models::client_version::ClientVersion, tables,
|
||||||
transaction::DbTx, DatabaseEnv, DatabaseEnvKind,
|
transaction::DbTx, DatabaseEnv, DatabaseEnvKind,
|
||||||
};
|
};
|
||||||
use reth_interfaces::db::DatabaseError;
|
|
||||||
use reth_libmdbx::MaxReadTransactionDuration;
|
use reth_libmdbx::MaxReadTransactionDuration;
|
||||||
|
use reth_storage_errors::db::DatabaseError;
|
||||||
use std::{sync::atomic::Ordering, thread::sleep, time::Duration};
|
use std::{sync::atomic::Ordering, thread::sleep, time::Duration};
|
||||||
use tempfile::tempdir;
|
use tempfile::tempdir;
|
||||||
|
|
||||||
|
|||||||
@ -81,7 +81,7 @@ pub mod mdbx {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub use abstraction::*;
|
pub use abstraction::*;
|
||||||
pub use reth_interfaces::db::{DatabaseError, DatabaseWriteOperation};
|
pub use reth_storage_errors::db::{DatabaseError, DatabaseWriteOperation};
|
||||||
pub use tables::*;
|
pub use tables::*;
|
||||||
pub use utils::is_database_empty;
|
pub use utils::is_database_empty;
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
use super::mask::{ColumnSelectorOne, ColumnSelectorThree, ColumnSelectorTwo};
|
use super::mask::{ColumnSelectorOne, ColumnSelectorThree, ColumnSelectorTwo};
|
||||||
use crate::table::Decompress;
|
use crate::table::Decompress;
|
||||||
use derive_more::{Deref, DerefMut};
|
use derive_more::{Deref, DerefMut};
|
||||||
use reth_interfaces::provider::{ProviderError, ProviderResult};
|
|
||||||
use reth_nippy_jar::{DataReader, NippyJar, NippyJarCursor};
|
use reth_nippy_jar::{DataReader, NippyJar, NippyJarCursor};
|
||||||
use reth_primitives::{static_file::SegmentHeader, B256};
|
use reth_primitives::{static_file::SegmentHeader, B256};
|
||||||
|
use reth_storage_errors::provider::{ProviderError, ProviderResult};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
/// Cursor of a static file segment.
|
/// Cursor of a static file segment.
|
||||||
|
|||||||
@ -5,8 +5,8 @@ use crate::{
|
|||||||
RawKey, RawTable,
|
RawKey, RawTable,
|
||||||
};
|
};
|
||||||
|
|
||||||
use reth_interfaces::provider::{ProviderError, ProviderResult};
|
|
||||||
use reth_nippy_jar::{ColumnResult, NippyJar, NippyJarHeader, PHFKey};
|
use reth_nippy_jar::{ColumnResult, NippyJar, NippyJarHeader, PHFKey};
|
||||||
|
use reth_storage_errors::provider::{ProviderError, ProviderResult};
|
||||||
use reth_tracing::tracing::*;
|
use reth_tracing::tracing::*;
|
||||||
use std::{error::Error as StdError, ops::RangeInclusive};
|
use std::{error::Error as StdError, ops::RangeInclusive};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user