mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-30 01:20:00 -07:00
global: snapshot
This commit is contained in:
@@ -5,7 +5,7 @@ use vecdb::Database;
|
||||
use super::Vecs;
|
||||
use crate::{
|
||||
indexes,
|
||||
internal::{ComputedFromHeightCumulativeFull, ComputedHeightDerivedCumulativeFull},
|
||||
internal::{ComputedFromHeightFull, ComputedHeightDerivedFull},
|
||||
};
|
||||
|
||||
impl Vecs {
|
||||
@@ -15,13 +15,13 @@ impl Vecs {
|
||||
indexes: &indexes::Vecs,
|
||||
) -> Result<Self> {
|
||||
Ok(Self {
|
||||
vbytes: ComputedFromHeightCumulativeFull::forced_import(
|
||||
vbytes: ComputedFromHeightFull::forced_import(
|
||||
db,
|
||||
"block_vbytes",
|
||||
version,
|
||||
indexes,
|
||||
)?,
|
||||
size: ComputedHeightDerivedCumulativeFull::forced_import(
|
||||
size: ComputedHeightDerivedFull::forced_import(
|
||||
db,
|
||||
"block_size",
|
||||
version,
|
||||
|
||||
@@ -2,10 +2,10 @@ use brk_traversable::Traversable;
|
||||
use brk_types::StoredU64;
|
||||
use vecdb::{Rw, StorageMode};
|
||||
|
||||
use crate::internal::{ComputedFromHeightCumulativeFull, ComputedHeightDerivedCumulativeFull};
|
||||
use crate::internal::{ComputedFromHeightFull, ComputedHeightDerivedFull};
|
||||
|
||||
#[derive(Traversable)]
|
||||
pub struct Vecs<M: StorageMode = Rw> {
|
||||
pub vbytes: ComputedFromHeightCumulativeFull<StoredU64, M>,
|
||||
pub size: ComputedHeightDerivedCumulativeFull<StoredU64, M>,
|
||||
pub vbytes: ComputedFromHeightFull<StoredU64, M>,
|
||||
pub size: ComputedHeightDerivedFull<StoredU64, M>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user