HomePhabricator

[refactor] Add deploymentstatus.h

Description

[refactor] Add deploymentstatus.h

Summary:
Provides DeploymentEnabled, DeploymentActiveAt, and DeploymentActiveAfter helpers for checking the status of buried deployments.

This is a partial backport of core#19438
https://github.com/bitcoin/bitcoin/pull/19438/commits/2b0d291da8f479739ff394dd92801da8c40b9f8e#

Note that GetBlockScriptFlags is off-by-one when applied to mempool transaction in the source material, hence the use of DeploymentActiveAfter instead of DeploymentActiveAt in our codebase (see explanation in D3361).

Depends on D12219

Test Plan:
ninja all check-all

Complete an IBD.

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
Anthony Towns <aj@erisian.com.au>Authored on Jun 16 2020, 08:58
PiRKCommitted on Oct 13 2022, 09:10
PiRKPushed on Oct 13 2022, 09:11
Reviewer
Restricted Project
Differential Revision
D12220: [refactor] Add deploymentstatus.h
Parents
rABC69c9129eb3ee: versionbits: Use dedicated lock instead of cs_main
Branches
Unknown
Tags
Unknown