refactor: use DeploymentActiveAfter in init.cpp

This commit is contained in:
Konstantin Akimov 2023-12-05 02:21:28 +07:00 committed by PastaPastaPasta
parent 7bce9d8209
commit c4d634c051

View File

@ -18,6 +18,7 @@
#include <chain.h> #include <chain.h>
#include <chainparams.h> #include <chainparams.h>
#include <context.h> #include <context.h>
#include <deploymentstatus.h>
#include <node/coinstats.h> #include <node/coinstats.h>
#include <fs.h> #include <fs.h>
#include <hash.h> #include <hash.h>
@ -2109,9 +2110,8 @@ bool AppInitMain(const CoreContext& context, NodeContext& node, interfaces::Bloc
failed_verification = true; failed_verification = true;
break; break;
} }
const bool v19active{DeploymentActiveAfter(tip, chainparams.GetConsensus(), Consensus::DEPLOYMENT_V19)};
bool v19active = llmq::utils::IsV19Active(tip); if (v19active) {
if (llmq::utils::IsV19Active(tip)) {
bls::bls_legacy_scheme.store(false); bls::bls_legacy_scheme.store(false);
LogPrintf("%s: bls_legacy_scheme=%d\n", __func__, bls::bls_legacy_scheme.load()); LogPrintf("%s: bls_legacy_scheme=%d\n", __func__, bls::bls_legacy_scheme.load());
} }