Skip to content

Commit deffe0d

Browse files
committed
deploymentstatus: allow chainman in place of consensusParams
1 parent eaa2e3f commit deffe0d

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

src/validation.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#include <consensus/tx_verify.h>
1717
#include <consensus/validation.h>
1818
#include <cuckoocache.h>
19-
#include <deploymentstatus.h>
2019
#include <flatfile.h>
2120
#include <hash.h>
2221
#include <logging.h>

src/validation.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <chain.h>
1616
#include <chainparams.h>
1717
#include <consensus/amount.h>
18+
#include <deploymentstatus.h>
1819
#include <fs.h>
1920
#include <node/blockstorage.h>
2021
#include <policy/feerate.h>
@@ -1003,6 +1004,25 @@ class ChainstateManager
10031004
~ChainstateManager();
10041005
};
10051006

1007+
/** Deployment* info via ChainstateManager */
1008+
template<typename DEP>
1009+
bool DeploymentActiveAfter(const CBlockIndex* pindexPrev, const ChainstateManager& chainman, DEP dep)
1010+
{
1011+
return DeploymentActiveAfter(pindexPrev, chainman.GetConsensus(), dep);
1012+
}
1013+
1014+
template<typename DEP>
1015+
bool DeploymentActiveAt(const CBlockIndex& index, const ChainstateManager& chainman, DEP dep)
1016+
{
1017+
return DeploymentActiveAt(index, chainman.GetConsensus(), dep);
1018+
}
1019+
1020+
template<typename DEP>
1021+
bool DeploymentEnabled(const ChainstateManager& chainman, DEP dep)
1022+
{
1023+
return DeploymentEnabled(chainman.GetConsensus(), dep);
1024+
}
1025+
10061026
using FopenFn = std::function<FILE*(const fs::path&, const char*)>;
10071027

10081028
/** Dump the mempool to disk. */

0 commit comments

Comments
 (0)