global: snapshot

This commit is contained in:
nym21
2025-10-31 21:37:02 +01:00
parent 82e59d409e
commit cf08e470ef
127 changed files with 1059 additions and 450 deletions

View File

@@ -59,10 +59,8 @@ impl ComputedValueVecsFromTxindex {
version + VERSION,
source_vec.map_or_else(|| sats.txindex.as_ref().unwrap().boxed_clone(), |s| s),
|txindex: TxIndex, iter| {
iter.next_at(txindex.to_usize()).map(|(_, value)| {
let sats = value.into_owned();
Bitcoin::from(sats)
})
iter.next_at(txindex.to_usize())
.map(|(_, sats)| Bitcoin::from(sats))
},
);
@@ -87,15 +85,13 @@ impl ComputedValueVecsFromTxindex {
txindex_to_height_iter,
height_to_price_close_iter| {
let txindex = txindex.to_usize();
txindex_to_btc_iter.next_at(txindex).and_then(|(_, value)| {
let btc = value.into_owned();
txindex_to_btc_iter.next_at(txindex).and_then(|(_, btc)| {
txindex_to_height_iter
.next_at(txindex)
.and_then(|(_, value)| {
let height = value.into_owned();
.and_then(|(_, height)| {
height_to_price_close_iter
.next_at(height.to_usize())
.map(|(_, close)| *close.into_owned() * btc)
.map(|(_, close)| *close * btc)
})
})
},