global: snapshot

This commit is contained in:
nym21
2025-12-27 20:34:13 +01:00
parent f9856cf0aa
commit 9ba77dac0f
28 changed files with 316 additions and 614 deletions
+1 -2
View File
@@ -31,7 +31,7 @@ impl Vecs {
indexes: &indexes::Vecs,
price: Option<&price::Vecs>,
) -> Result<Self> {
let db = Database::open(&parent_path.join("chain"))?;
let db = Database::open(&parent_path.join(super::DB_NAME))?;
db.set_min_len(PAGE_SIZE * 50_000_000)?;
let version = parent_version + Version::ZERO;
@@ -463,7 +463,6 @@ impl Vecs {
.flat_map(|v| v.region_names())
.collect(),
)?;
this.db.compact()?;
Ok(this)
+2
View File
@@ -14,6 +14,8 @@ use crate::grouped::{
ComputedVecsFromHeight, ComputedVecsFromTxindex,
};
pub const DB_NAME: &str = "chain";
pub(crate) const TARGET_BLOCKS_PER_DAY_F64: f64 = 144.0;
pub(crate) const TARGET_BLOCKS_PER_DAY_F32: f32 = 144.0;
pub(crate) const TARGET_BLOCKS_PER_DAY: u64 = 144;