mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-29 00:59:58 -07:00
global: snapshot
This commit is contained in:
@@ -4,7 +4,7 @@ use brk_types::{TxIndex, VSize, Version, Weight};
|
||||
use vecdb::{Database, IterableCloneableVec, LazyVecFrom2, VecIndex};
|
||||
|
||||
use super::Vecs;
|
||||
use crate::{indexes, internal::LazyTxDistribution};
|
||||
use crate::{indexes, internal::LazyFromTxDistribution};
|
||||
|
||||
impl Vecs {
|
||||
pub fn forced_import(
|
||||
@@ -42,14 +42,14 @@ impl Vecs {
|
||||
);
|
||||
|
||||
Ok(Self {
|
||||
vsize: LazyTxDistribution::forced_import(
|
||||
vsize: LazyFromTxDistribution::forced_import(
|
||||
db,
|
||||
"tx_vsize",
|
||||
version,
|
||||
txindex_to_vsize,
|
||||
indexes,
|
||||
)?,
|
||||
weight: LazyTxDistribution::forced_import(
|
||||
weight: LazyFromTxDistribution::forced_import(
|
||||
db,
|
||||
"tx_weight",
|
||||
version,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
use brk_traversable::Traversable;
|
||||
use brk_types::{StoredU32, VSize, Weight};
|
||||
|
||||
use crate::internal::LazyTxDistribution;
|
||||
use crate::internal::LazyFromTxDistribution;
|
||||
|
||||
#[derive(Clone, Traversable)]
|
||||
pub struct Vecs {
|
||||
pub vsize: LazyTxDistribution<VSize, StoredU32, StoredU32>,
|
||||
pub weight: LazyTxDistribution<Weight, StoredU32, StoredU32>,
|
||||
pub vsize: LazyFromTxDistribution<VSize, StoredU32, StoredU32>,
|
||||
pub weight: LazyFromTxDistribution<Weight, StoredU32, StoredU32>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user