Page MenuHomePhabricator

refactor: Extract GetBogoSize function

Authored by PiRK on Aug 30 2021, 14:35.


Group Reviewers
Restricted Project
rABC8ae513e3867c: refactor: Extract GetBogoSize function

This is another intermediate part of the Coinstats Index (tracked in core#18000).

Sjors suggested here that the part of the changes in #19145 that don't rely on the new hash_type muhash, i.e. that are for hash_type=none, could be merged separately from everything involving muhash. So these changes are extracted from #19145 here and can be merged without any other requirements.

Building the index with no UTXO set hash is still valuable because gettxoutsetinfo can still be used to audit the total_amount for example. By itself this PR is not a huge improvement, hash_type=none is speeding up gettxoutsetinfo by about 10%, but it enables the implementation of an index on top of it in a follow-up and that means large parts of the index code of Coinstats Index can be merged while reviews for the hashing algorithm might take longer.

This is a backport of core#19328 [1/4]

Test Plan

ninja all check-all

Diff Detail

rABC Bitcoin ABC
Lint Not Applicable
Tests Not Applicable