cleanup: tidy-up masternode/payments.cpp comments and [[nodiscard]]

This commit is contained in:
Konstantin Akimov 2023-09-04 17:27:47 +07:00 committed by PastaPastaPasta
parent be7dcd4281
commit 732ce241cc

View File

@ -24,13 +24,7 @@
#include <cassert> #include <cassert>
#include <string> #include <string>
/** [[nodiscard]] static bool GetBlockTxOuts(const int nBlockHeight, const CAmount blockReward, std::vector<CTxOut>& voutMasternodePaymentsRet)
* GetMasternodeTxOuts
*
* Get masternode payment tx outputs
*/
static bool GetBlockTxOuts(const int nBlockHeight, const CAmount blockReward, std::vector<CTxOut>& voutMasternodePaymentsRet)
{ {
voutMasternodePaymentsRet.clear(); voutMasternodePaymentsRet.clear();
@ -74,7 +68,12 @@ static bool GetBlockTxOuts(const int nBlockHeight, const CAmount blockReward, st
} }
static bool GetMasternodeTxOuts(const int nBlockHeight, const CAmount blockReward, std::vector<CTxOut>& voutMasternodePaymentsRet) /**
* GetMasternodeTxOuts
*
* Get masternode payment tx outputs
*/
[[nodiscard]] static bool GetMasternodeTxOuts(const int nBlockHeight, const CAmount blockReward, std::vector<CTxOut>& voutMasternodePaymentsRet)
{ {
// make sure it's not filled yet // make sure it's not filled yet
voutMasternodePaymentsRet.clear(); voutMasternodePaymentsRet.clear();
@ -94,7 +93,7 @@ static bool GetMasternodeTxOuts(const int nBlockHeight, const CAmount blockRewar
return true; return true;
} }
static bool IsTransactionValid(const CTransaction& txNew, const int nBlockHeight, const CAmount blockReward) [[nodiscard]] static bool IsTransactionValid(const CTransaction& txNew, const int nBlockHeight, const CAmount blockReward)
{ {
if (!deterministicMNManager->IsDIP3Enforced(nBlockHeight)) { if (!deterministicMNManager->IsDIP3Enforced(nBlockHeight)) {
// can't verify historical blocks here // can't verify historical blocks here