Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
deploymentstatus.h
Go to the documentation of this file.
1// Copyright (c) 2020-present The Bitcoin Core developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#ifndef BITCOIN_DEPLOYMENTSTATUS_H
6#define BITCOIN_DEPLOYMENTSTATUS_H
7
8#include <chain.h>
9#include <versionbits.h>
10
11#include <limits>
12
15{
17 return (pindexPrev == nullptr ? 0 : pindexPrev->nHeight + 1) >= params.DeploymentHeight(dep);
18}
19
25
32
38
41{
43 return params.DeploymentHeight(dep) != std::numeric_limits<int>::max();
44}
45
51
52#endif // BITCOIN_DEPLOYMENTSTATUS_H
The block chain is a tree shaped structure starting with the genesis block at the root,...
Definition chain.h:94
CBlockIndex * pprev
pointer to the index of the predecessor of this block
Definition chain.h:100
int nHeight
height of the entry in the chain. The genesis block has height 0
Definition chain.h:106
BIP 9 allows multiple softforks to be deployed in parallel.
Definition versionbits.h:77
bool DeploymentActiveAfter(const CBlockIndex *pindexPrev, const Consensus::Params &params, Consensus::BuriedDeployment dep, VersionBitsCache &versionbitscache)
Determine if a deployment is active for the next block.
bool DeploymentEnabled(const Consensus::Params &params, Consensus::BuriedDeployment dep)
Determine if a deployment is enabled (can ever be active)
bool DeploymentActiveAt(const CBlockIndex &index, const Consensus::Params &params, Consensus::BuriedDeployment dep, VersionBitsCache &versionbitscache)
Determine if a deployment is active for this block.
constexpr bool ValidDeployment(BuriedDeployment dep)
Definition params.h:32
DeploymentPos
Definition params.h:34
BuriedDeployment
A buried deployment is one where the height of the activation has been hardcoded into the client impl...
Definition params.h:24
static constexpr int64_t NEVER_ACTIVE
Special value for nStartTime indicating that the deployment is never active.
Definition params.h:78
Parameters that influence chain consensus.
Definition params.h:84
int DeploymentHeight(BuriedDeployment dep) const
Definition params.h:139
std::array< BIP9Deployment, MAX_VERSION_BITS_DEPLOYMENTS > vDeployments
Definition params.h:110
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.
Definition time.h:73
assert(!tx.IsCoinBase())