From 3ba293fbccb3cc51f3bb48e0969656163ea4d8c9 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Thu, 18 Apr 2024 17:56:14 +0000 Subject: [PATCH] refactor: remove fMasternodeMode checks in CActiveMasternodeManager CActiveMasternodeManager no longer exists as a global variable, it is a conditionally initialized smart pointer. If it exists, then it's in masternode mode, no need to check if we're in masternode mode anymore. --- src/masternode/node.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/masternode/node.cpp b/src/masternode/node.cpp index 23bfce2d47..3964c8d195 100644 --- a/src/masternode/node.cpp +++ b/src/masternode/node.cpp @@ -75,8 +75,6 @@ void CActiveMasternodeManager::InitInternal(const CBlockIndex* pindex) { AssertLockHeld(cs); - if (!fMasternodeMode) return; - if (!DeploymentDIP0003Enforced(pindex->nHeight, Params().GetConsensus())) return; // Check that our local network configuration is correct @@ -146,8 +144,6 @@ void CActiveMasternodeManager::InitInternal(const CBlockIndex* pindex) void CActiveMasternodeManager::UpdatedBlockTip(const CBlockIndex* pindexNew, const CBlockIndex* pindexFork, bool fInitialDownload) { - if (!fMasternodeMode) return; - if (!DeploymentDIP0003Enforced(pindexNew->nHeight, Params().GetConsensus())) return; const auto [cur_state, cur_protx_hash] = WITH_READ_LOCK(cs, return std::make_pair(m_state, m_info.proTxHash));