mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-24 06:39:58 -07:00
42 lines
1.1 KiB
Rust
42 lines
1.1 KiB
Rust
use brk_error::Result;
|
|
use brk_types::Version;
|
|
use vecdb::Database;
|
|
|
|
use super::Vecs;
|
|
use crate::{indexes, internal::ComputedPerBlockCumulativeSum};
|
|
|
|
impl Vecs {
|
|
pub(crate) fn forced_import(
|
|
db: &Database,
|
|
version: Version,
|
|
indexes: &indexes::Vecs,
|
|
) -> Result<Self> {
|
|
Ok(Self {
|
|
destroyed: ComputedPerBlockCumulativeSum::forced_import(
|
|
db,
|
|
"cointime_value_destroyed",
|
|
version,
|
|
indexes,
|
|
)?,
|
|
created: ComputedPerBlockCumulativeSum::forced_import(
|
|
db,
|
|
"cointime_value_created",
|
|
version,
|
|
indexes,
|
|
)?,
|
|
stored: ComputedPerBlockCumulativeSum::forced_import(
|
|
db,
|
|
"cointime_value_stored",
|
|
version,
|
|
indexes,
|
|
)?,
|
|
vocdd: ComputedPerBlockCumulativeSum::forced_import(
|
|
db,
|
|
"vocdd",
|
|
version + Version::ONE,
|
|
indexes,
|
|
)?,
|
|
})
|
|
}
|
|
}
|