computer: simplified a bunch of things

This commit is contained in:
nym21
2026-02-26 19:37:22 +01:00
parent 9e4fe62de2
commit cccaf6b206
252 changed files with 3788 additions and 7279 deletions

View File

@@ -130,9 +130,9 @@ impl Vecs {
self.segwit.compute(starting_indexes.height, &window_starts, exit, |v| {
Ok(v.compute_transform3(
starting_indexes.height,
&self.p2wpkh.last.height,
&self.p2wsh.last.height,
&self.p2tr.last.height,
&self.p2wpkh.height,
&self.p2wsh.height,
&self.p2tr.height,
|(h, p2wpkh, p2wsh, p2tr, ..)| {
(h, StoredU64::from(*p2wpkh + *p2wsh + *p2tr))
},
@@ -143,8 +143,8 @@ impl Vecs {
// Adoption ratios: per-block ratio of script type / total outputs
self.taproot_adoption.height.compute_transform2(
starting_indexes.height,
&self.p2tr.last.height,
&outputs_count.total_count.sum_cum.sum.0,
&self.p2tr.height,
&outputs_count.total_count.sum_cumulative.sum.0,
|(h, p2tr, total, ..)| {
let ratio = if *total > 0 {
StoredF32::from(*p2tr as f64 / *total as f64)
@@ -158,8 +158,8 @@ impl Vecs {
self.segwit_adoption.height.compute_transform2(
starting_indexes.height,
&self.segwit.last.height,
&outputs_count.total_count.sum_cum.sum.0,
&self.segwit.height,
&outputs_count.total_count.sum_cumulative.sum.0,
|(h, segwit, total, ..)| {
let ratio = if *total > 0 {
StoredF32::from(*segwit as f64 / *total as f64)