HomePhabricator

[Chronik] Add `BlockStatsReader` and `BlockStatsWriter`

Description

[Chronik] Add BlockStatsReader and BlockStatsWriter

Summary:
Measure and store some stats about blocks (see BlockStats), and write them to the DB.

num_inputs includes coinbase "inputs", but if a user only wants the non-coinbase inputs, they can simply subtract 1.

We separate the sum of the output sats into sum_coinbase_output_sats and sum_normal_output_sats, if someone wants the total output sats of the block, they can simply add them together.

Test Plan: ninja check-crates

Reviewers: Fabien, #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Differential Revision: https://reviews.bitcoinabc.org/D13849

Details

Provenance
tobias_ruckAuthored on May 3 2023, 11:51
tobias_ruckPushed on May 4 2023, 09:03
Reviewer
Restricted Project
Differential Revision
D13849: [Chronik] Add `BlockStatsReader` and `BlockStatsWriter`
Parents
rABCb9151b3d6462: [e.cash] Add hand image to hero section
Branches
Unknown
Tags
Unknown