mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
chore: rm unused databasemetadata trait (#14003)
This commit is contained in:
@ -12,7 +12,7 @@ use metrics::{gauge, Label};
|
||||
use reth_db_api::{
|
||||
cursor::{DbCursorRO, DbCursorRW},
|
||||
database::Database,
|
||||
database_metrics::{DatabaseMetadata, DatabaseMetadataValue, DatabaseMetrics},
|
||||
database_metrics::DatabaseMetrics,
|
||||
models::ClientVersion,
|
||||
transaction::{DbTx, DbTxMut},
|
||||
};
|
||||
@ -276,12 +276,6 @@ impl DatabaseMetrics for DatabaseEnv {
|
||||
}
|
||||
}
|
||||
|
||||
impl DatabaseMetadata for DatabaseEnv {
|
||||
fn metadata(&self) -> DatabaseMetadataValue {
|
||||
DatabaseMetadataValue::new(self.freelist().ok())
|
||||
}
|
||||
}
|
||||
|
||||
impl DatabaseEnv {
|
||||
/// Opens the database at the specified path with the given `EnvKind`.
|
||||
///
|
||||
|
||||
@ -46,9 +46,7 @@ pub mod test_utils {
|
||||
use crate::mdbx::DatabaseArguments;
|
||||
use parking_lot::RwLock;
|
||||
use reth_db_api::{
|
||||
database::Database,
|
||||
database_metrics::{DatabaseMetadata, DatabaseMetadataValue, DatabaseMetrics},
|
||||
models::ClientVersion,
|
||||
database::Database, database_metrics::DatabaseMetrics, models::ClientVersion,
|
||||
};
|
||||
use reth_fs_util;
|
||||
use reth_libmdbx::MaxReadTransactionDuration;
|
||||
@ -155,12 +153,6 @@ pub mod test_utils {
|
||||
}
|
||||
}
|
||||
|
||||
impl<DB: DatabaseMetadata> DatabaseMetadata for TempDatabase<DB> {
|
||||
fn metadata(&self) -> DatabaseMetadataValue {
|
||||
self.db().metadata()
|
||||
}
|
||||
}
|
||||
|
||||
/// Create `static_files` path for testing
|
||||
#[track_caller]
|
||||
pub fn create_test_static_files_dir() -> (TempDir, PathBuf) {
|
||||
|
||||
Reference in New Issue
Block a user