Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F10615384
deploymentstatus.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
deploymentstatus.h
View Options
// Copyright (c) 2020 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_DEPLOYMENTSTATUS_H
#define BITCOIN_DEPLOYMENTSTATUS_H
#include
<chain.h>
#include
<limits>
/** Determine if a deployment is active for the next block */
inline
bool
DeploymentActiveAfter
(
const
CBlockIndex
*
pindexPrev
,
const
Consensus
::
Params
&
params
,
Consensus
::
BuriedDeployment
dep
)
{
assert
(
Consensus
::
ValidDeployment
(
dep
));
return
(
pindexPrev
==
nullptr
?
0
:
pindexPrev
->
nHeight
+
1
)
>=
params
.
DeploymentHeight
(
dep
);
}
/** Determine if a deployment is active for this block */
inline
bool
DeploymentActiveAt
(
const
CBlockIndex
&
index
,
const
Consensus
::
Params
&
params
,
Consensus
::
BuriedDeployment
dep
)
{
assert
(
Consensus
::
ValidDeployment
(
dep
));
return
index
.
nHeight
>=
params
.
DeploymentHeight
(
dep
);
}
#endif
// BITCOIN_DEPLOYMENTSTATUS_H
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Sat, Nov 23, 10:06 (22 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4505251
Default Alt Text
deploymentstatus.h (1 KB)
Attached To
rSTAGING Bitcoin ABC staging
Event Timeline
Log In to Comment