Skip to main content

cuprate_blockchain/ops/
property.rs

1//! Database properties functions - version, pruning, etc.
2//!
3//! SOMEDAY: the database `properties` table is not yet implemented.
4
5use cuprate_pruning::PruningSeed;
6
7use crate::error::DbResult;
8
9//---------------------------------------------------------------------------------------------------- Free Functions
10/// SOMEDAY
11///
12#[inline]
13pub const fn get_blockchain_pruning_seed() -> DbResult<PruningSeed> {
14    // SOMEDAY: impl pruning.
15    // We need a DB properties table.
16    Ok(PruningSeed::NotPruned)
17}
18
19/// SOMEDAY
20///
21#[inline]
22pub const fn db_version() -> DbResult<u64> {
23    // SOMEDAY: We need a DB properties table.
24    Ok(crate::constants::DATABASE_VERSION)
25}