mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-06-29 21:52:09 -07:00
global: snapshot
This commit is contained in:
@@ -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,
|
||||
)?)
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user