Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion crates/storage/src/versioned/id_indexed_v1/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,6 @@ impl<TContentKey: OverlayContentKey> IdIndexedV1Store<TContentKey> {
/// See https://github.com/ethereum/trin/issues/1653 for details.
const fn extra_disk_usage_per_content_bytes(content_type: &ContentType) -> u64 {
match content_type {
ContentType::History => 750,
ContentType::HistoryEternal => 750,
ContentType::State => 500,
ContentType::HistoryEphemeral => panic!("HistoryEphemeral is not supported"),
Expand Down
5 changes: 0 additions & 5 deletions crates/storage/src/versioned/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ pub use utils::create_store;
#[derive(Clone, Debug, Display, Eq, PartialEq, AsRefStr)]
#[strum(serialize_all = "snake_case")]
pub enum ContentType {
/// Corresponds to the history network content.
///
/// This type is deprecated and `HistoryEternal` or should be used instead.
/// See https://github.com/ethereum/trin/issues/1666".
History,
/// Corresponds to the state network content.
State,
/// Corresponds to the non-ephemeral history network content.
Expand Down
9 changes: 6 additions & 3 deletions crates/storage/src/versioned/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ pub mod test {
create_test_portal_storage_config_with_capacity(STORAGE_CAPACITY_MB)?;
let conn = config.sql_connection_pool.get()?;

assert_eq!(get_store_version(&ContentType::History, &conn)?, None);
assert_eq!(
get_store_version(&ContentType::HistoryEternal, &conn)?,
None
);
Ok(())
}

Expand Down Expand Up @@ -197,14 +200,14 @@ pub mod test {
let sql_connection_pool = config.sql_connection_pool.clone();

update_store_info(
&ContentType::History,
&ContentType::HistoryEternal,
StoreVersion::IdIndexedV1,
&sql_connection_pool.get().unwrap(),
)
.unwrap();

// Should panic - MockContentStore doesn't support migration.
create_store::<MockContentStore>(ContentType::History, config, sql_connection_pool)
create_store::<MockContentStore>(ContentType::HistoryEternal, config, sql_connection_pool)
.unwrap();
}
}