mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
Decouple cs_mnauth/cs_main (#3220)
This commit is contained in:
parent
08f447af92
commit
dfe99c9507
@ -55,14 +55,16 @@ void CMNAuth::ProcessMessage(CNode* pnode, const std::string& strCommand, CDataS
|
||||
CMNAuth mnauth;
|
||||
vRecv >> mnauth;
|
||||
|
||||
// only one MNAUTH allowed
|
||||
bool fAlreadyHaveMNAUTH = false;
|
||||
{
|
||||
LOCK(pnode->cs_mnauth);
|
||||
// only one MNAUTH allowed
|
||||
if (!pnode->verifiedProRegTxHash.IsNull()) {
|
||||
LOCK(cs_main);
|
||||
Misbehaving(pnode->GetId(), 100);
|
||||
return;
|
||||
}
|
||||
fAlreadyHaveMNAUTH = !pnode->verifiedProRegTxHash.IsNull();
|
||||
}
|
||||
if (fAlreadyHaveMNAUTH) {
|
||||
LOCK(cs_main);
|
||||
Misbehaving(pnode->GetId(), 100);
|
||||
return;
|
||||
}
|
||||
|
||||
if (mnauth.proRegTxHash.IsNull() || !mnauth.sig.IsValid()) {
|
||||
|
Loading…
Reference in New Issue
Block a user