mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
fix(coinjoin): CreateDenominated crash (#4838)
We overshoot (intentionally) and nBalanceToDenominate can become negative because of that. It was fine with raw loops but irange throws an exception here.
This commit is contained in:
parent
e95655cd9f
commit
b582524939
@ -1697,6 +1697,7 @@ bool CCoinJoinClientSession::CreateDenominated(CAmount nBalanceToDenominate, con
|
||||
|
||||
// Go big to small
|
||||
for (auto nDenomValue : denoms) {
|
||||
if (nBalanceToDenominate <= 0) break;
|
||||
int nOutputs = 0;
|
||||
|
||||
// Number of denoms we can create given our denom and the amount of funds we have left
|
||||
|
Loading…
Reference in New Issue
Block a user