diff options
author | Anthony Towns <aj@erisian.com.au> | 2022-04-15 05:49:31 +1000 |
---|---|---|
committer | Anthony Towns <aj@erisian.com.au> | 2022-05-10 12:09:33 +1000 |
commit | deffe0df6c36225bada18603b5a840139f030f2c (patch) | |
tree | 313b9e543e114c988b882effaf0e4f4e34af2c91 /src | |
parent | eaa2e3f25cefbd1b9a1214102f88dbfa8109d244 (diff) |
deploymentstatus: allow chainman in place of consensusParams
Diffstat (limited to 'src')
-rw-r--r-- | src/validation.cpp | 1 | ||||
-rw-r--r-- | src/validation.h | 20 |
2 files changed, 20 insertions, 1 deletions
diff --git a/src/validation.cpp b/src/validation.cpp index 3fb1f16366..6bed75a185 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -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> diff --git a/src/validation.h b/src/validation.h index 55f8b841f4..9d6b1d5932 100644 --- a/src/validation.h +++ b/src/validation.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. */ |