global: fmt

This commit is contained in:
nym21
2026-03-28 11:56:51 +01:00
parent b6e56c4e9f
commit 24d2b7b142
213 changed files with 6888 additions and 2527 deletions
+2 -1
View File
@@ -104,7 +104,8 @@ pub(super) fn store_tx_metadata(
md.txid.checked_push(ct.tx_index, ct.txid)?;
md.raw_locktime
.checked_push(ct.tx_index, ct.tx.lock_time.into())?;
md.base_size.checked_push(ct.tx_index, ct.base_size.into())?;
md.base_size
.checked_push(ct.tx_index, ct.base_size.into())?;
md.total_size
.checked_push(ct.tx_index, ct.total_size.into())?;
md.is_explicitly_rbf
+11 -9
View File
@@ -2,8 +2,8 @@ use brk_cohort::ByAddrType;
use brk_error::{Error, Result};
use brk_store::Store;
use brk_types::{
AddrBytes, AddrHash, AddrIndexOutPoint, AddrIndexTxIndex, OutPoint, OutputType,
Sats, TxIndex, TxOutIndex, TypeIndex, Unit, Vout,
AddrBytes, AddrHash, AddrIndexOutPoint, AddrIndexTxIndex, OutPoint, OutputType, Sats, TxIndex,
TxOutIndex, TypeIndex, Unit, Vout,
};
use rayon::prelude::*;
use rustc_hash::{FxHashMap, FxHashSet};
@@ -119,9 +119,7 @@ pub(super) fn finalize_outputs(
already_added_addr_hash: &mut ByAddrType<FxHashMap<AddrHash, TypeIndex>>,
same_block_output_info: &mut FxHashMap<OutPoint, SameBlockOutputInfo>,
) -> Result<()> {
already_added_addr_hash
.values_mut()
.for_each(|m| m.clear());
already_added_addr_hash.values_mut().for_each(|m| m.clear());
same_block_output_info.clear();
for ProcessedOutput {
@@ -168,25 +166,29 @@ pub(super) fn finalize_outputs(
match output_type {
OutputType::P2MS => {
scripts
.p2ms.to_tx_index
.p2ms
.to_tx_index
.checked_push(indexes.p2ms_output_index, tx_index)?;
indexes.p2ms_output_index.copy_then_increment()
}
OutputType::OpReturn => {
scripts
.op_return.to_tx_index
.op_return
.to_tx_index
.checked_push(indexes.op_return_index, tx_index)?;
indexes.op_return_index.copy_then_increment()
}
OutputType::Empty => {
scripts
.empty.to_tx_index
.empty
.to_tx_index
.checked_push(indexes.empty_output_index, tx_index)?;
indexes.empty_output_index.copy_then_increment()
}
OutputType::Unknown => {
scripts
.unknown.to_tx_index
.unknown
.to_tx_index
.checked_push(indexes.unknown_output_index, tx_index)?;
indexes.unknown_output_index.copy_then_increment()
}
+2 -2
View File
@@ -1,8 +1,8 @@
use bitcoin::{Transaction, TxOut};
use brk_cohort::ByAddrType;
use brk_types::{
AddrBytes, AddrHash, OutPoint, OutputType, TxIndex, TxOutIndex, Txid, TxidPrefix,
TypeIndex, Vin, Vout,
AddrBytes, AddrHash, OutPoint, OutputType, TxIndex, TxOutIndex, Txid, TxidPrefix, TypeIndex,
Vin, Vout,
};
use rustc_hash::{FxHashMap, FxHashSet};