global: snap

This commit is contained in:
nym21
2026-04-04 18:19:11 +02:00
parent 5340cc288e
commit 62f51761ee
23 changed files with 492 additions and 126 deletions

View File

@@ -206,13 +206,12 @@ impl Query {
.total
.sum
.collect_range_at(begin, end);
let utxo_begin = begin.saturating_sub(1);
let utxo_set_sizes = computer
.outputs
.count
.unspent
.height
.collect_range_at(utxo_begin, end);
.collect_range_at(begin, end);
let input_volumes = computer
.transactions
.volume
@@ -279,9 +278,6 @@ impl Query {
let subsidy = subsidy_sats[i];
let total_inputs = (*input_counts[i]).saturating_sub(1);
let total_outputs = *output_counts[i];
let utxo_idx = begin + i - utxo_begin;
let utxo_set_size = *utxo_set_sizes[utxo_idx];
let prev_utxo_set_size = if utxo_idx > 0 { *utxo_set_sizes[utxo_idx - 1] } else { 0 };
let vsize = weight.to_vbytes_ceil();
let total_fees_u64 = u64::from(total_fees);
let non_coinbase = tx_count.saturating_sub(1) as u64;
@@ -383,8 +379,8 @@ impl Query {
segwit_total_size: *segwit_sizes[i],
segwit_total_weight: segwit_weights[i],
header: raw_header.to_lower_hex_string(),
utxo_set_change: utxo_set_size as i64 - prev_utxo_set_size as i64,
utxo_set_size,
utxo_set_change: total_outputs as i64 - total_inputs as i64,
utxo_set_size: *utxo_set_sizes[i],
total_input_amt,
virtual_size: vsize as f64,
price: prices[i],
@@ -552,7 +548,9 @@ impl Query {
.ok()
.map(|a| a.to_string())
})
.collect();
.collect::<Vec<_>>();
let mut coinbase_addresses = coinbase_addresses;
coinbase_addresses.dedup();
let coinbase_address = coinbase_addresses.first().cloned();
let coinbase_signature = tx