mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
fix: fix potential mutex lifetime issue were we are returning a reference, and then releasing the mutex
This commit is contained in:
parent
85caf8aa34
commit
7f36f122b2
@ -663,8 +663,9 @@ void CDKGSession::VerifyAndJustify(CDKGPendingMessages& pendingMessages)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto& qc = WITH_LOCK(invCs, return std::move(complaints.at(*m->complaints.begin())));
|
LOCK(invCs);
|
||||||
if (qc.complainForMembers[*myIdx]) {
|
if (const auto& qc = complaints.at(*m->complaints.begin());
|
||||||
|
qc.complainForMembers[*myIdx]) {
|
||||||
justifyFor.emplace(qc.proTxHash);
|
justifyFor.emplace(qc.proTxHash);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user