global: snapshot

This commit is contained in:
nym21
2026-03-13 16:27:10 +01:00
parent b2a1251774
commit 3709ceff8e
168 changed files with 2007 additions and 2008 deletions
+2 -2
View File
@@ -93,8 +93,8 @@ impl Vecs {
|vec| {
Ok(vec.compute_transform2(
starting_indexes.height,
&self.base.blocks_mined.raw.height,
&mining.rewards.coinbase.raw.sats.height,
&self.base.blocks_mined.base.height,
&mining.rewards.coinbase.base.sats.height,
|(h, mask, val, ..)| (h, MaskSats::apply(mask, val)),
exit,
)?)
+3 -3
View File
@@ -8,7 +8,7 @@ use vecdb::{
use crate::{
blocks, indexes,
internal::{
CachedWindowStarts, ComputedPerBlockCumulativeWithSums, PercentPerBlock, RatioU64Bp16,
CachedWindowStarts, PerBlockCumulativeWithSums, PercentPerBlock, RatioU64Bp16,
},
};
@@ -17,7 +17,7 @@ pub struct Vecs<M: StorageMode = Rw> {
#[traversable(skip)]
slug: PoolSlug,
pub blocks_mined: ComputedPerBlockCumulativeWithSums<StoredU32, StoredU64, M>,
pub blocks_mined: PerBlockCumulativeWithSums<StoredU32, StoredU64, M>,
pub dominance: PercentPerBlock<BasisPoints16, M>,
}
@@ -31,7 +31,7 @@ impl Vecs {
) -> Result<Self> {
let suffix = |s: &str| format!("{}_{s}", slug);
let blocks_mined = ComputedPerBlockCumulativeWithSums::forced_import(
let blocks_mined = PerBlockCumulativeWithSums::forced_import(
db,
&suffix("blocks_mined"),
version + Version::ONE,
+1 -1
View File
@@ -18,7 +18,7 @@ pub mod minor;
use crate::{
blocks, indexes,
internal::{finalize_db, open_db, CachedWindowStarts},
internal::{CachedWindowStarts, db_utils::{finalize_db, open_db}},
mining, prices,
};