mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
refactor: introduce cs_pendingSigns
This commit is contained in:
parent
5adf92cb3c
commit
397a157e8d
@ -1479,7 +1479,7 @@ void CSigSharesManager::WorkThreadMain()
|
||||
|
||||
void CSigSharesManager::AsyncSign(const CQuorumCPtr& quorum, const uint256& id, const uint256& msgHash)
|
||||
{
|
||||
LOCK(cs);
|
||||
LOCK(cs_pendingSigns);
|
||||
pendingSigns.emplace_back(quorum, id, msgHash);
|
||||
}
|
||||
|
||||
@ -1487,7 +1487,7 @@ void CSigSharesManager::SignPendingSigShares()
|
||||
{
|
||||
std::vector<PendingSignatureData> v;
|
||||
{
|
||||
LOCK(cs);
|
||||
LOCK(cs_pendingSigns);
|
||||
v = std::move(pendingSigns);
|
||||
}
|
||||
|
||||
|
@ -399,7 +399,8 @@ private:
|
||||
PendingSignatureData(CQuorumCPtr quorum, const uint256& id, const uint256& msgHash) : quorum(std::move(quorum)), id(id), msgHash(msgHash){}
|
||||
};
|
||||
|
||||
std::vector<PendingSignatureData> pendingSigns GUARDED_BY(cs);
|
||||
Mutex cs_pendingSigns;
|
||||
std::vector<PendingSignatureData> pendingSigns GUARDED_BY(cs_pendingSigns);
|
||||
|
||||
FastRandomContext rnd GUARDED_BY(cs);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user