Skip to content

Commit

Permalink
cleanup: tidy-up masternode/payments.cpp comments and [[nodiscard]]
Browse files Browse the repository at this point in the history
  • Loading branch information
knst committed Sep 4, 2023
1 parent 54202e0 commit 7ff210a
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/masternode/payments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,7 @@
#include <cassert>
#include <string>

/**
* GetMasternodeTxOuts
*
* Get masternode payment tx outputs
*/

static bool GetBlockTxOuts(const int nBlockHeight, const CAmount blockReward, std::vector<CTxOut>& voutMasternodePaymentsRet)
[[nodiscard]] static bool GetBlockTxOuts(const int nBlockHeight, const CAmount blockReward, std::vector<CTxOut>& voutMasternodePaymentsRet)
{
voutMasternodePaymentsRet.clear();

Expand Down Expand Up @@ -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
voutMasternodePaymentsRet.clear();
Expand All @@ -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
Expand Down

0 comments on commit 7ff210a

Please sign in to comment.