mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-07-30 04:08:11 -07:00
global: snapshot
This commit is contained in:
@@ -16,8 +16,8 @@ pub struct ActivityBase<M: StorageMode = Rw> {
|
||||
impl ActivityBase {
|
||||
pub(crate) fn forced_import(cfg: &ImportConfig) -> Result<Self> {
|
||||
Ok(Self {
|
||||
sent: cfg.import_value_cumulative("sent", Version::ZERO)?,
|
||||
sent_ema: cfg.import_emas_2w("sent", Version::ZERO)?,
|
||||
sent: cfg.import("sent", Version::ZERO)?,
|
||||
sent_ema: cfg.import("sent", Version::ZERO)?,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@ impl ActivityFull {
|
||||
Ok(Self {
|
||||
base: ActivityBase::forced_import(cfg)?,
|
||||
coinblocks_destroyed: cfg
|
||||
.import_cumulative_sum("coinblocks_destroyed", Version::ONE)?,
|
||||
coindays_destroyed: cfg.import_cumulative_sum("coindays_destroyed", Version::ONE)?,
|
||||
.import("coinblocks_destroyed", Version::ONE)?,
|
||||
coindays_destroyed: cfg.import("coindays_destroyed", Version::ONE)?,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
mod base;
|
||||
mod full;
|
||||
|
||||
pub use base::*;
|
||||
pub use full::*;
|
||||
pub use base::ActivityBase;
|
||||
pub use full::ActivityFull;
|
||||
|
||||
Reference in New Issue
Block a user