Skip to content

Commit

Permalink
Merge pull request #247 from UdjinM6/11.2-mn-donations
Browse files Browse the repository at this point in the history
fix pubkey/donation selection
  • Loading branch information
evan82 committed Mar 16, 2015
2 parents c65adeb + 567fe41 commit 5b4412f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/masternode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,10 +411,10 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
newWinner.nBlockHeight = nBlockHeight;
newWinner.vin = pmn->vin;

if(pmn->donationPercentage > 0 && nHash % 100 > pmn->donationPercentage){
newWinner.payee.SetDestination(pmn->pubkey.GetID());
} else {
if(pmn->donationPercentage > 0 && nHash % 100 < pmn->donationPercentage) {
newWinner.payee.SetDestination(pmn->donationAddress.GetID());
} else {
newWinner.payee.SetDestination(pmn->pubkey.GetID());
}
}

Expand All @@ -433,10 +433,10 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
newWinner.nBlockHeight = nBlockHeight;
newWinner.vin = pmn->vin;

if(pmn->donationPercentage > 0 && nHash % 100 < pmn->donationPercentage){
newWinner.payee.SetDestination(pmn->pubkey.GetID());
} else {
if(pmn->donationPercentage > 0 && nHash % 100 < pmn->donationPercentage) {
newWinner.payee.SetDestination(pmn->donationAddress.GetID());
} else {
newWinner.payee.SetDestination(pmn->pubkey.GetID());
}

break; // we found active MN
Expand Down

0 comments on commit 5b4412f

Please sign in to comment.