Page MenuHomePhabricator

[Chronik] Add `BlockStatsReader` and `BlockStatsWriter`
ClosedPublic

Authored by tobias_ruck on May 3 2023, 11:54.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable