Skip to content

Commit 57351ca

Browse files
authored
feat!: remove old store ContentType::History (#1709)
1 parent 9d2df51 commit 57351ca

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

crates/storage/src/versioned/id_indexed_v1/store.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,6 @@ impl<TContentKey: OverlayContentKey> IdIndexedV1Store<TContentKey> {
552552
/// See https://github.com/ethereum/trin/issues/1653 for details.
553553
const fn extra_disk_usage_per_content_bytes(content_type: &ContentType) -> u64 {
554554
match content_type {
555-
ContentType::History => 750,
556555
ContentType::HistoryEternal => 750,
557556
ContentType::State => 500,
558557
ContentType::HistoryEphemeral => panic!("HistoryEphemeral is not supported"),

crates/storage/src/versioned/mod.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ pub use utils::create_store;
1818
#[derive(Clone, Debug, Display, Eq, PartialEq, AsRefStr)]
1919
#[strum(serialize_all = "snake_case")]
2020
pub enum ContentType {
21-
/// Corresponds to the history network content.
22-
///
23-
/// This type is deprecated and `HistoryEternal` or should be used instead.
24-
/// See https://github.com/ethereum/trin/issues/1666".
25-
History,
2621
/// Corresponds to the state network content.
2722
State,
2823
/// Corresponds to the non-ephemeral history network content.

crates/storage/src/versioned/utils.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,10 @@ pub mod test {
103103
create_test_portal_storage_config_with_capacity(STORAGE_CAPACITY_MB)?;
104104
let conn = config.sql_connection_pool.get()?;
105105

106-
assert_eq!(get_store_version(&ContentType::History, &conn)?, None);
106+
assert_eq!(
107+
get_store_version(&ContentType::HistoryEternal, &conn)?,
108+
None
109+
);
107110
Ok(())
108111
}
109112

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

199202
update_store_info(
200-
&ContentType::History,
203+
&ContentType::HistoryEternal,
201204
StoreVersion::IdIndexedV1,
202205
&sql_connection_pool.get().unwrap(),
203206
)
204207
.unwrap();
205208

206209
// Should panic - MockContentStore doesn't support migration.
207-
create_store::<MockContentStore>(ContentType::History, config, sql_connection_pool)
210+
create_store::<MockContentStore>(ContentType::HistoryEternal, config, sql_connection_pool)
208211
.unwrap();
209212
}
210213
}

0 commit comments

Comments
 (0)