HomePhabricator

[refactor] Move ComputeBlockVersion into VersionBitsCache

Description

[refactor] Move ComputeBlockVersion into VersionBitsCache

Summary:
This also changes ComputeBlockVersion to take the versionbits cache mutex once, rather than once for each versionbits deployment.

This concludes backport of core#19438
https://github.com/bitcoin/bitcoin/pull/19438/commits/4a69b4dbe0d7f504811b67c399da7e6d11e4f805
https://github.com/bitcoin/bitcoin/pull/19438/commits/c5f36725e877d8eb492383844f8ef7535466b366
https://github.com/bitcoin/bitcoin/pull/19438/commits/e48826ad87b4f92261f7433e84f48dac9bd9e5c3

Depends on D12225

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
Anthony Towns <aj@erisian.com.au>Authored on Apr 16 2021, 08:33
PiRKCommitted on Oct 13 2022, 09:42
PiRKPushed on Oct 13 2022, 09:43
Reviewer
Restricted Project
Differential Revision
D12226: [refactor] Move ComputeBlockVersion into VersionBitsCache
Parents
rABCd41722812a7c: [refactor] versionbits: make VersionBitsCache a full class
Branches
Unknown
Tags
Unknown