From 732ce241ccc9a90bec2ee078e05e2c371ea2eca1 Mon Sep 17 00:00:00 2001 From: Konstantin Akimov Date: Mon, 4 Sep 2023 17:27:47 +0700 Subject: [PATCH] cleanup: tidy-up masternode/payments.cpp comments and [[nodiscard]] --- src/masternode/payments.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/masternode/payments.cpp b/src/masternode/payments.cpp index 22c785811c..63c83fd1f1 100644 --- a/src/masternode/payments.cpp +++ b/src/masternode/payments.cpp @@ -24,13 +24,7 @@ #include #include -/** -* GetMasternodeTxOuts -* -* Get masternode payment tx outputs -*/ - -static bool GetBlockTxOuts(const int nBlockHeight, const CAmount blockReward, std::vector& voutMasternodePaymentsRet) +[[nodiscard]] static bool GetBlockTxOuts(const int nBlockHeight, const CAmount blockReward, std::vector& voutMasternodePaymentsRet) { 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& voutMasternodePaymentsRet) +/** +* GetMasternodeTxOuts +* +* Get masternode payment tx outputs +*/ +[[nodiscard]] static bool GetMasternodeTxOuts(const int nBlockHeight, const CAmount blockReward, std::vector& voutMasternodePaymentsRet) { // make sure it's not filled yet voutMasternodePaymentsRet.clear(); @@ -94,7 +93,7 @@ static bool GetMasternodeTxOuts(const int nBlockHeight, const CAmount blockRewar 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)) { // can't verify historical blocks here