mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 20:42:59 +01:00
Payout and enforce operator reward payments
This commit is contained in:
parent
2c481f0f86
commit
60002b7ddb
@ -588,7 +588,15 @@ bool CMasternodePayments::GetBlockTxOuts(int nBlockHeight, CAmount blockReward,
|
|||||||
if (!dmnPayee) {
|
if (!dmnPayee) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dmnPayee->nOperatorReward == 0 || dmnPayee->pdmnState->scriptOperatorPayout == CScript()) {
|
||||||
voutMasternodePaymentsRet.emplace_back(masternodeReward, dmnPayee->pdmnState->scriptPayout);
|
voutMasternodePaymentsRet.emplace_back(masternodeReward, dmnPayee->pdmnState->scriptPayout);
|
||||||
|
} else {
|
||||||
|
CAmount operatorReward = (masternodeReward * dmnPayee->nOperatorReward) / 10000;
|
||||||
|
masternodeReward -= operatorReward;
|
||||||
|
voutMasternodePaymentsRet.emplace_back(masternodeReward, dmnPayee->pdmnState->scriptPayout);
|
||||||
|
voutMasternodePaymentsRet.emplace_back(operatorReward, dmnPayee->pdmnState->scriptOperatorPayout);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
LOCK(cs_mapMasternodeBlocks);
|
LOCK(cs_mapMasternodeBlocks);
|
||||||
|
Loading…
Reference in New Issue
Block a user