mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
Drop new connection instead of old one when duplicate MNAUTH is received (#3272)
This commit is contained in:
parent
7e3ed76e54
commit
c76552b0b5
@ -101,12 +101,16 @@ void CMNAuth::ProcessMessage(CNode* pnode, const std::string& strCommand, CDataS
|
||||
|
||||
connman.ForEachNode([&](CNode* pnode2) {
|
||||
if (pnode2->verifiedProRegTxHash == mnauth.proRegTxHash) {
|
||||
LogPrint(BCLog::NET, "CMNAuth::ProcessMessage -- Masternode %s has already verified as peer %d, dropping old connection. peer=%d\n",
|
||||
LogPrint(BCLog::NET, "CMNAuth::ProcessMessage -- Masternode %s has already verified as peer %d, dropping new connection. peer=%d\n",
|
||||
mnauth.proRegTxHash.ToString(), pnode2->GetId(), pnode->GetId());
|
||||
pnode2->fDisconnect = true;
|
||||
pnode->fDisconnect = true;
|
||||
}
|
||||
});
|
||||
|
||||
if (pnode->fDisconnect) {
|
||||
return;
|
||||
}
|
||||
|
||||
{
|
||||
LOCK(pnode->cs_mnauth);
|
||||
pnode->verifiedProRegTxHash = mnauth.proRegTxHash;
|
||||
|
Loading…
Reference in New Issue
Block a user