Skip to content

Commit

Permalink
Merge #1050: [Core] Prevent coinstakes from overpaying masternodes
Browse files Browse the repository at this point in the history
370a36c [Core] Prevent coinstakes from overpaying masternodes (random-zebra)

Pull request description:

  Straightforward update.
  As already discussed, since the removal of see-saw algo, there is no need for keeping the possibility to overpay masternodes in coinstakes.

ACKs for top commit:
  Fuzzbawls:
    utACK 370a36c
  furszy:
    utACK 370a36c
  Mrs-X:
    utACK PIVX-Project/PIVX@370a36c

Tree-SHA512: c22890d216dfdfd40e126489a13f56c5af8a3ac583ac322af13e6dd864a2c12b2b3e99cbe773c146a231011709cd5dc337c3b591263c47f80221fe52c471f352
  • Loading branch information
furszy authored and akshaynexus committed Oct 26, 2019
1 parent cc5cd49 commit eb9719b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/masternode-payments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,10 +575,11 @@ bool CMasternodeBlockPayees::IsTransactionValid(const CTransaction& txNew)
bool found = false;
BOOST_FOREACH (CTxOut out, txNew.vout) {
if (payee.scriptPubKey == out.scriptPubKey) {
if(out.nValue >= requiredMasternodePayment)
if(out.nValue == requiredMasternodePayment)
found = true;
else
LogPrint("masternode","Masternode payment is out of drift range. Paid=%s Min=%s\n", FormatMoney(out.nValue).c_str(), FormatMoney(requiredMasternodePayment).c_str());
LogPrintf("%s : Masternode payment value (%s) different from required value (%s).\n",
__func__, FormatMoney(out.nValue).c_str(), FormatMoney(requiredMasternodePayment).c_str());
}
}

Expand Down

0 comments on commit eb9719b

Please sign in to comment.