mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-05-02 02:20:00 -07:00
global: snapshot
This commit is contained in:
@@ -5,14 +5,14 @@ use vecdb::Database;
|
||||
use super::Vecs;
|
||||
use crate::{
|
||||
indexes,
|
||||
internal::{ComputedBlockFull, DerivedTxFull},
|
||||
internal::{ComputedFromHeightFull, TxDerivedFull},
|
||||
};
|
||||
|
||||
impl Vecs {
|
||||
pub fn forced_import(db: &Database, version: Version, indexes: &indexes::Vecs) -> Result<Self> {
|
||||
Ok(Self {
|
||||
total_count: DerivedTxFull::forced_import(db, "output_count", version, indexes)?,
|
||||
utxo_count: ComputedBlockFull::forced_import(db, "exact_utxo_count", version, indexes)?,
|
||||
total_count: TxDerivedFull::forced_import(db, "output_count", version, indexes)?,
|
||||
utxo_count: ComputedFromHeightFull::forced_import(db, "exact_utxo_count", version, indexes)?,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
use brk_traversable::Traversable;
|
||||
use brk_types::StoredU64;
|
||||
|
||||
use crate::internal::{ComputedBlockFull, DerivedTxFull};
|
||||
use crate::internal::{ComputedFromHeightFull, TxDerivedFull};
|
||||
|
||||
#[derive(Clone, Traversable)]
|
||||
pub struct Vecs {
|
||||
pub total_count: DerivedTxFull<StoredU64>,
|
||||
pub utxo_count: ComputedBlockFull<StoredU64>,
|
||||
pub total_count: TxDerivedFull<StoredU64>,
|
||||
pub utxo_count: ComputedFromHeightFull<StoredU64>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user