global: MASSIVE snapshot

This commit is contained in:
nym21
2026-02-23 17:22:12 +01:00
parent be0d749f9c
commit 3b7aa8242a
703 changed files with 29130 additions and 30779 deletions

View File

@@ -1,13 +1,13 @@
use brk_error::Result;
use brk_indexer::Indexer;
use brk_types::{StoredBool, TxIndex, Version};
use vecdb::{Database, IterableCloneableVec, LazyVecFrom2};
use vecdb::{Database, ReadableCloneableVec, LazyVecFrom2};
use super::Vecs;
use crate::{indexes, internal::ComputedFromHeightFull};
impl Vecs {
pub fn forced_import(
pub(crate) fn forced_import(
db: &Database,
version: Version,
indexer: &Indexer,
@@ -16,13 +16,10 @@ impl Vecs {
let txindex_to_is_coinbase = LazyVecFrom2::init(
"is_coinbase",
version,
indexer.vecs.transactions.height.boxed_clone(),
indexer.vecs.transactions.first_txindex.boxed_clone(),
|index: TxIndex, txindex_to_height_iter, height_to_first_txindex_iter| {
txindex_to_height_iter.get(index).map(|height| {
let txindex = height_to_first_txindex_iter.get_unwrap(height);
StoredBool::from(index == txindex)
})
indexer.vecs.transactions.height.read_only_boxed_clone(),
indexer.vecs.transactions.first_txindex.read_only_boxed_clone(),
|index: TxIndex, _height, first_txindex| {
StoredBool::from(index == first_txindex)
},
);