Skip to content

Commit

Permalink
A couple of small fixes for mixing collaterals (#2294)
Browse files Browse the repository at this point in the history
* No reasons to create mixing collaterals if we can't create denoms to mix

* Include non-anonymizable inputs when trying to make mixing collaterals
  • Loading branch information
UdjinM6 authored Sep 15, 2018
1 parent d192d64 commit c6a0c55
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/privatesend-client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1327,7 +1327,7 @@ bool CPrivateSendClientSession::MakeCollateralAmounts(CConnman& connman)
if (!pwalletMain) return false;

std::vector<CompactTallyItem> vecTally;
if(!pwalletMain->SelectCoinsGrouppedByAddresses(vecTally, false)) {
if(!pwalletMain->SelectCoinsGrouppedByAddresses(vecTally, false, false)) {
LogPrint("privatesend", "CPrivateSendClientSession::MakeCollateralAmounts -- SelectCoinsGrouppedByAddresses can't find any inputs!\n");
return false;
}
Expand Down Expand Up @@ -1522,6 +1522,9 @@ bool CPrivateSendClientSession::CreateDenominated(const CompactTallyItem& tallyI
} while (nOutputsTotal == 0 && !fSkip);
LogPrintf("CPrivateSendClientSession::CreateDenominated -- 3 - nOutputsTotal: %d, nValueLeft: %f\n", nOutputsTotal, (float)nValueLeft/COIN);

// No reasons to create mixing collaterals if we can't create denoms to mix
if (nOutputsTotal == 0) return false;

// if we have anything left over, it will be automatically send back as change - there is no need to send it manually

CCoinControl coinControl;
Expand Down

0 comments on commit c6a0c55

Please sign in to comment.