Page MenuHomePhabricator

deploymentinfo: Add DeploymentName()
ClosedPublic

Authored by PiRK on Oct 12 2022, 15:02.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC4352a943c0b9: deploymentinfo: Add DeploymentName()
Summary

Add and use DeploymentName(). Add missing includes in blockchain.cpp. Rename BIP9SoftForkDescPushBack -> SoftForkDescPushBack. Add a SoftForkDescPushBack function for buried deployments (currently not used in the RPC)

This is a partial backport of core#19438
https://github.com/bitcoin/bitcoin/pull/19438/commits/92f48f360da5f425428b761219301f509826bec4
https://github.com/bitcoin/bitcoin/pull/19438/commits/8ee3e0bed5bf2cd3c7a68ca6ba6c65f7b9a72cca

Notes:

  • D5218 already replaced the name argument with a DeploymentPos in BIP9SoftForkDescPushBack
  • we don't report buried deployment in getblockchaininfo, so this backport only maintains the current code we have for active BIP9 activations. A DeploymentName function is added for buried deployments, but currently unused.

Depends on D12222

Test Plan

ninja all check-all

Event Timeline

PiRK requested review of this revision.Oct 12 2022, 15:02

remove unused std::string DeploymentName(Consensus::BuriedDeployment dep) function

Fabien requested changes to this revision.Oct 12 2022, 15:54
Fabien added a subscriber: Fabien.

You should not remove the buried part but rather use [[maybe_unused]] and leave it there so we can use it for miner fund activation later

src/rpc/blockchain.cpp
1638

This is renamed in the source material

This revision now requires changes to proceed.Oct 12 2022, 15:54
PiRK edited the summary of this revision. (Show Details)

add missing includes and DeploymentName function for buried deployments.

PiRK edited the summary of this revision. (Show Details)

also add [[maybe_unused]] SoftForkDescPushBack(... , Consensus::BuriedDeployment dep) for potential later use and for easier future backports

Fabien requested changes to this revision.Oct 13 2022, 08:19
Fabien added inline comments.
src/deploymentinfo.cpp
17 ↗(On Diff #35635)

You need maybe_unused here as well

This revision now requires changes to proceed.Oct 13 2022, 08:19

add missing maybe_unused

This revision is now accepted and ready to land.Oct 13 2022, 09:35
This revision was landed with ongoing or failed builds.Oct 13 2022, 09:43
This revision was automatically updated to reflect the committed changes.