diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp index 6fab344cd196b..00592e68fa9d6 100644 --- a/src/masternode-payments.cpp +++ b/src/masternode-payments.cpp @@ -324,7 +324,7 @@ bool CMasternodePayments::GetLegacyMasternodeTxOut(int nHeight, std::vectorGetPayeeScript(); } else { diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp index 58d9b4fc8630f..bf954a92c49e3 100644 --- a/src/masternodeman.cpp +++ b/src/masternodeman.cpp @@ -572,7 +572,7 @@ MasternodeRef CMasternodeMan::GetNextMasternodeInQueueForPayment(int nBlockHeigh return pBestMasternode; } -MasternodeRef CMasternodeMan::GetCurrentMasterNode(int nHeight, const uint256& hash) const +MasternodeRef CMasternodeMan::GetCurrentMasterNode(const uint256& hash) const { int minProtocol = ActiveProtocol(); int64_t score = 0; @@ -617,7 +617,7 @@ std::vector> CMasternodeMan::GetMnScores(int nLast for (int nHeight = nChainHeight - nLast; nHeight < nChainHeight + 20; nHeight++) { const uint256& hash = GetHashAtHeight(nHeight - 101); - MasternodeRef winner = GetCurrentMasterNode(nHeight, hash); + MasternodeRef winner = GetCurrentMasterNode(hash); if (winner) { ret.emplace_back(winner, nHeight); } diff --git a/src/masternodeman.h b/src/masternodeman.h index ed9c5276472db..9bc24a98428d5 100644 --- a/src/masternodeman.h +++ b/src/masternodeman.h @@ -144,8 +144,8 @@ class CMasternodeMan /// Find an entry in the masternode list that is next to be paid MasternodeRef GetNextMasternodeInQueueForPayment(int nBlockHeight, bool fFilterSigTime, int& nCount, const CBlockIndex* pChainTip = nullptr) const; - /// Get the current winner for this block - MasternodeRef GetCurrentMasterNode(int nHeight, const uint256& hash) const; + /// Get the winner for this block hash + MasternodeRef GetCurrentMasterNode(const uint256& hash) const; /// vector of pairs std::vector> GetMnScores(int nLast) const;