global: speed improvement part2

This commit is contained in:
nym21
2026-04-09 14:02:26 +02:00
parent 21a0226a19
commit 5a3e1b4e6e
24 changed files with 137 additions and 160 deletions
+1 -2
View File
@@ -43,7 +43,6 @@ impl BlockProcessor<'_> {
already_added: &mut ByAddrType<FxHashMap<AddrHash, TypeIndex>>,
same_block_info: &mut FxHashMap<OutPoint, SameBlockOutputInfo>,
) -> Result<()> {
let height = self.height;
let indexes = &mut *self.indexes;
// Split transactions vecs: finalize needs first_txout_index/first_txin_index, metadata needs the rest
@@ -85,7 +84,7 @@ impl BlockProcessor<'_> {
same_block_info,
)
},
|| tx::store_tx_metadata(height, txs, txid_prefix_store, &mut tx_metadata),
|| tx::store_tx_metadata(txs, txid_prefix_store, &mut tx_metadata),
);
finalize_result?;
+1 -3
View File
@@ -1,6 +1,6 @@
use brk_error::{Error, Result};
use brk_store::Store;
use brk_types::{Height, StoredBool, TxIndex, Txid, TxidPrefix};
use brk_types::{StoredBool, TxIndex, Txid, TxidPrefix};
use rayon::prelude::*;
use tracing::error;
use vecdb::{AnyVec, WritableVec, likely};
@@ -89,7 +89,6 @@ impl<'a> BlockProcessor<'a> {
}
pub(super) fn store_tx_metadata(
height: Height,
txs: Vec<ComputedTx>,
store: &mut Store<TxidPrefix, TxIndex>,
md: &mut TxMetadataVecs<'_>,
@@ -98,7 +97,6 @@ pub(super) fn store_tx_metadata(
if ct.prev_tx_index_opt.is_none() {
store.insert(ct.txid_prefix, ct.tx_index);
}
md.height.checked_push(ct.tx_index, height)?;
md.tx_version
.checked_push(ct.tx_index, ct.tx.version.into())?;
md.txid.checked_push(ct.tx_index, ct.txid)?;