mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -03:00
deploymentstatus: allow chainman in place of consensusParams
This commit is contained in:
parent
eaa2e3f25c
commit
deffe0df6c
2 changed files with 20 additions and 1 deletions
|
@ -16,7 +16,6 @@
|
|||
#include <consensus/tx_verify.h>
|
||||
#include <consensus/validation.h>
|
||||
#include <cuckoocache.h>
|
||||
#include <deploymentstatus.h>
|
||||
#include <flatfile.h>
|
||||
#include <hash.h>
|
||||
#include <logging.h>
|
||||
|
|
|
@ -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. */
|
||||
|
|
Loading…
Add table
Reference in a new issue