mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
Limit the scope of cs_wallet lock in CPrivateSendClient::PrepareDenominate() (#1997)
This commit is contained in:
parent
a3bcc4307d
commit
4d442376e9
@ -1141,10 +1141,12 @@ 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);
|
||||
{
|
||||
// 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";
|
||||
|
Loading…
Reference in New Issue
Block a user