global: snapshot

This commit is contained in:
nym21
2025-12-12 16:55:55 +01:00
parent e755f2856a
commit 3526a177fc
66 changed files with 1964 additions and 9175 deletions
@@ -172,7 +172,7 @@ where
self.height.compute(
starting_indexes.height,
txindex,
&indexer.vecs.height_to_first_txindex,
&indexer.vecs.tx.height_to_first_txindex,
&indexes.height_to_txindex_count,
exit,
)?;
@@ -182,7 +182,7 @@ where
self.height.compute(
starting_indexes.height,
txindex,
&indexer.vecs.height_to_first_txindex,
&indexer.vecs.tx.height_to_first_txindex,
&indexes.height_to_txindex_count,
exit,
)?;
@@ -252,7 +252,7 @@ impl ComputedVecsFromTxindex<Bitcoin> {
let mut last_iter = sats.height.last.as_ref().map(|v| v.into_iter());
let mut cumulative_iter = sats.height.cumulative.as_ref().map(|v| v.into_iter());
(starting_index.to_usize()..indexer.vecs.height_to_weight.len())
(starting_index.to_usize()..indexer.vecs.block.height_to_weight.len())
.map(Height::from)
.try_for_each(|height| -> Result<()> {
if let Some(first) = self.height.first.as_mut() {
@@ -375,7 +375,7 @@ impl ComputedVecsFromTxindex<Dollars> {
let mut last_iter = bitcoin.height.last.as_ref().map(|v| v.into_iter());
let mut cumulative_iter = bitcoin.height.cumulative.as_ref().map(|v| v.into_iter());
(starting_index.to_usize()..indexer.vecs.height_to_weight.len())
(starting_index.to_usize()..indexer.vecs.block.height_to_weight.len())
.map(Height::from)
.try_for_each(|height| -> Result<()> {
let price = *close_iter.get_unwrap(height);
@@ -74,7 +74,7 @@ impl ComputedValueVecsFromTxindex {
&name_usd,
version + VERSION,
bitcoin_txindex.boxed_clone(),
indexer.vecs.txindex_to_height.boxed_clone(),
indexer.vecs.tx.txindex_to_height.boxed_clone(),
price.chainindexes_to_price_close.height.boxed_clone(),
|txindex: TxIndex,
txindex_to_btc_iter,