mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
Limit the scope of cs_wallet lock in CPrivateSendClient::PrepareDenominate() (#1997)
This commit is contained in:
parent
a3bcc4307d
commit
4d442376e9
@ -1141,11 +1141,13 @@ bool CPrivateSendClient::PrepareDenominate(int nMinRounds, int nMaxRounds, std::
|
||||
}
|
||||
|
||||
if (CPrivateSend::GetDenominations(vecTxOutRet) != nSessionDenom) {
|
||||
{
|
||||
// unlock used coins on failure
|
||||
LOCK(pwalletMain->cs_wallet);
|
||||
for (const auto& txin : vecTxDSInRet) {
|
||||
pwalletMain->UnlockCoin(txin.prevout);
|
||||
}
|
||||
}
|
||||
keyHolderStorage.ReturnAll();
|
||||
strErrorRet = "Can't make current denominated outputs";
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user