cuprate_blockchain/ops/
property.rs

1//! Database properties functions - version, pruning, etc.
2//!
3//! SOMEDAY: the database `properties` table is not yet implemented.
4
5//---------------------------------------------------------------------------------------------------- Import
6use cuprate_database::DbResult;
7use cuprate_pruning::PruningSeed;
8
9use crate::ops::macros::doc_error;
10
11//---------------------------------------------------------------------------------------------------- Free Functions
12/// SOMEDAY
13///
14#[doc = doc_error!()]
15///
16/// # Example
17/// ```rust
18/// # use cuprate_blockchain::{*, tables::*, ops::block::*, ops::tx::*};
19/// // SOMEDAY
20/// ```
21#[inline]
22pub const fn get_blockchain_pruning_seed() -> DbResult<PruningSeed> {
23    // SOMEDAY: impl pruning.
24    // We need a DB properties table.
25    Ok(PruningSeed::NotPruned)
26}
27
28/// SOMEDAY
29///
30#[doc = doc_error!()]
31///
32/// # Example
33/// ```rust
34/// # use cuprate_blockchain::{*, tables::*, ops::block::*, ops::tx::*};
35/// // SOMEDAY
36/// ```
37#[inline]
38pub const fn db_version() -> DbResult<u64> {
39    // SOMEDAY: We need a DB properties table.
40    Ok(crate::constants::DATABASE_VERSION)
41}