mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-28 08:39:59 -07:00
global: snapshot part 4
This commit is contained in:
@@ -6,7 +6,7 @@ use super::Vecs;
|
||||
use crate::{
|
||||
indexes,
|
||||
internal::{
|
||||
AmountPerBlockCumulative, AmountPerBlockCumulativeWithSums, AmountPerBlockFull,
|
||||
AmountPerBlockCumulative, AmountPerBlockCumulativeRolling, AmountPerBlockFull,
|
||||
CachedWindowStarts, FiatPerBlock, LazyPercentRollingWindows, OneMinusBp16,
|
||||
PercentPerBlock, PercentRollingWindows, RatioRollingWindows,
|
||||
},
|
||||
@@ -33,10 +33,10 @@ impl Vecs {
|
||||
);
|
||||
|
||||
Ok(Self {
|
||||
coinbase: AmountPerBlockCumulativeWithSums::forced_import(
|
||||
coinbase: AmountPerBlockCumulativeRolling::forced_import(
|
||||
db, "coinbase", version, indexes, cached_starts,
|
||||
)?,
|
||||
subsidy: AmountPerBlockCumulativeWithSums::forced_import(
|
||||
subsidy: AmountPerBlockCumulativeRolling::forced_import(
|
||||
db, "subsidy", version, indexes, cached_starts,
|
||||
)?,
|
||||
fees: AmountPerBlockFull::forced_import(db, "fees", version, indexes, cached_starts)?,
|
||||
|
||||
@@ -3,15 +3,15 @@ use brk_types::{BasisPoints16, BasisPoints32, Cents};
|
||||
use vecdb::{Rw, StorageMode};
|
||||
|
||||
use crate::internal::{
|
||||
AmountPerBlockCumulative, AmountPerBlockCumulativeWithSums, AmountPerBlockFull,
|
||||
AmountPerBlockCumulative, AmountPerBlockCumulativeRolling, AmountPerBlockFull,
|
||||
FiatPerBlock, LazyPercentRollingWindows, PercentPerBlock, PercentRollingWindows,
|
||||
RatioRollingWindows,
|
||||
};
|
||||
|
||||
#[derive(Traversable)]
|
||||
pub struct Vecs<M: StorageMode = Rw> {
|
||||
pub coinbase: AmountPerBlockCumulativeWithSums<M>,
|
||||
pub subsidy: AmountPerBlockCumulativeWithSums<M>,
|
||||
pub coinbase: AmountPerBlockCumulativeRolling<M>,
|
||||
pub subsidy: AmountPerBlockCumulativeRolling<M>,
|
||||
pub fees: AmountPerBlockFull<M>,
|
||||
pub unclaimed: AmountPerBlockCumulative<M>,
|
||||
#[traversable(wrap = "fees", rename = "dominance")]
|
||||
|
||||
Reference in New Issue
Block a user