mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
fix pubkey/donation conditions
This commit is contained in:
parent
c65adeb7d1
commit
567fe419d9
@ -411,10 +411,10 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
|
|||||||
newWinner.nBlockHeight = nBlockHeight;
|
newWinner.nBlockHeight = nBlockHeight;
|
||||||
newWinner.vin = pmn->vin;
|
newWinner.vin = pmn->vin;
|
||||||
|
|
||||||
if(pmn->donationPercentage > 0 && nHash % 100 > pmn->donationPercentage){
|
if(pmn->donationPercentage > 0 && nHash % 100 < pmn->donationPercentage) {
|
||||||
newWinner.payee.SetDestination(pmn->pubkey.GetID());
|
|
||||||
} else {
|
|
||||||
newWinner.payee.SetDestination(pmn->donationAddress.GetID());
|
newWinner.payee.SetDestination(pmn->donationAddress.GetID());
|
||||||
|
} else {
|
||||||
|
newWinner.payee.SetDestination(pmn->pubkey.GetID());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -433,10 +433,10 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
|
|||||||
newWinner.nBlockHeight = nBlockHeight;
|
newWinner.nBlockHeight = nBlockHeight;
|
||||||
newWinner.vin = pmn->vin;
|
newWinner.vin = pmn->vin;
|
||||||
|
|
||||||
if(pmn->donationPercentage > 0 && nHash % 100 < pmn->donationPercentage){
|
if(pmn->donationPercentage > 0 && nHash % 100 < pmn->donationPercentage) {
|
||||||
newWinner.payee.SetDestination(pmn->pubkey.GetID());
|
|
||||||
} else {
|
|
||||||
newWinner.payee.SetDestination(pmn->donationAddress.GetID());
|
newWinner.payee.SetDestination(pmn->donationAddress.GetID());
|
||||||
|
} else {
|
||||||
|
newWinner.payee.SetDestination(pmn->pubkey.GetID());
|
||||||
}
|
}
|
||||||
|
|
||||||
break; // we found active MN
|
break; // we found active MN
|
||||||
|
Loading…
Reference in New Issue
Block a user