cuprate_blockchain/ops/
property.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! Database properties functions - version, pruning, etc.
//!
//! SOMEDAY: the database `properties` table is not yet implemented.

//---------------------------------------------------------------------------------------------------- Import
use cuprate_database::DbResult;
use cuprate_pruning::PruningSeed;

use crate::ops::macros::doc_error;

//---------------------------------------------------------------------------------------------------- Free Functions
/// SOMEDAY
///
#[doc = doc_error!()]
///
/// # Example
/// ```rust
/// # use cuprate_blockchain::{*, tables::*, ops::block::*, ops::tx::*};
/// // SOMEDAY
/// ```
#[inline]
pub const fn get_blockchain_pruning_seed() -> DbResult<PruningSeed> {
    // SOMEDAY: impl pruning.
    // We need a DB properties table.
    Ok(PruningSeed::NotPruned)
}

/// SOMEDAY
///
#[doc = doc_error!()]
///
/// # Example
/// ```rust
/// # use cuprate_blockchain::{*, tables::*, ops::block::*, ops::tx::*};
/// // SOMEDAY
/// ```
#[inline]
pub const fn db_version() -> DbResult<u64> {
    // SOMEDAY: We need a DB properties table.
    Ok(crate::constants::DATABASE_VERSION)
}