Skip to content

Commit 8afc832

Browse files
committed
[Cleanup] Remove IsZerocoinMint check in FillBlockPayee
1 parent e567f7f commit 8afc832

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

src/masternode-payments.cpp

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -338,21 +338,19 @@ void CMasternodePayments::FillBlockPayee(CMutableTransaction& txCoinbase, CMutab
338338
txCoinstake.vout[i].nValue = masternodePayment;
339339

340340
//subtract mn payment from the stake reward
341-
if (!txCoinstake.vout[1].IsZerocoinMint()) {
342-
if (i == 2) {
343-
// Majority of cases; do it quick and move on
344-
txCoinstake.vout[i - 1].nValue -= masternodePayment;
345-
} else if (i > 2) {
346-
// special case, stake is split between (i-1) outputs
347-
unsigned int outputs = i-1;
348-
CAmount mnPaymentSplit = masternodePayment / outputs;
349-
CAmount mnPaymentRemainder = masternodePayment - (mnPaymentSplit * outputs);
350-
for (unsigned int j=1; j<=outputs; j++) {
351-
txCoinstake.vout[j].nValue -= mnPaymentSplit;
352-
}
353-
// in case it's not an even division, take the last bit of dust from the last one
354-
txCoinstake.vout[outputs].nValue -= mnPaymentRemainder;
341+
if (i == 2) {
342+
// Majority of cases; do it quick and move on
343+
txCoinstake.vout[i - 1].nValue -= masternodePayment;
344+
} else if (i > 2) {
345+
// special case, stake is split between (i-1) outputs
346+
unsigned int outputs = i-1;
347+
CAmount mnPaymentSplit = masternodePayment / outputs;
348+
CAmount mnPaymentRemainder = masternodePayment - (mnPaymentSplit * outputs);
349+
for (unsigned int j=1; j<=outputs; j++) {
350+
txCoinstake.vout[j].nValue -= mnPaymentSplit;
355351
}
352+
// in case it's not an even division, take the last bit of dust from the last one
353+
txCoinstake.vout[outputs].nValue -= mnPaymentRemainder;
356354
}
357355
} else {
358356
txCoinbase.vout.resize(2);

0 commit comments

Comments
 (0)