mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
deploymentstatus: allow chainman in place of consensusParams
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include <chain.h>
|
||||
#include <chainparams.h>
|
||||
#include <consensus/amount.h>
|
||||
#include <deploymentstatus.h>
|
||||
#include <fs.h>
|
||||
#include <node/blockstorage.h>
|
||||
#include <policy/feerate.h>
|
||||
@@ -1003,6 +1004,25 @@ public:
|
||||
~ChainstateManager();
|
||||
};
|
||||
|
||||
/** Deployment* info via ChainstateManager */
|
||||
template<typename DEP>
|
||||
bool DeploymentActiveAfter(const CBlockIndex* pindexPrev, const ChainstateManager& chainman, DEP dep)
|
||||
{
|
||||
return DeploymentActiveAfter(pindexPrev, chainman.GetConsensus(), dep);
|
||||
}
|
||||
|
||||
template<typename DEP>
|
||||
bool DeploymentActiveAt(const CBlockIndex& index, const ChainstateManager& chainman, DEP dep)
|
||||
{
|
||||
return DeploymentActiveAt(index, chainman.GetConsensus(), dep);
|
||||
}
|
||||
|
||||
template<typename DEP>
|
||||
bool DeploymentEnabled(const ChainstateManager& chainman, DEP dep)
|
||||
{
|
||||
return DeploymentEnabled(chainman.GetConsensus(), dep);
|
||||
}
|
||||
|
||||
using FopenFn = std::function<FILE*(const fs::path&, const char*)>;
|
||||
|
||||
/** Dump the mempool to disk. */
|
||||
|
||||
Reference in New Issue
Block a user