@@ -63,13 +63,19 @@ void CMNAuth::ProcessMessage(CNode* pnode, const std::string& strCommand, CDataS
6363 }
6464 if (fAlreadyHaveMNAUTH ) {
6565 LOCK (cs_main);
66- Misbehaving (pnode->GetId (), 100 );
66+ Misbehaving (pnode->GetId (), 100 , " duplicate mnauth" );
67+ return ;
68+ }
69+
70+ if (mnauth.proRegTxHash .IsNull ()) {
71+ LOCK (cs_main);
72+ Misbehaving (pnode->GetId (), 100 , " empty mnauth proRegTxHash" );
6773 return ;
6874 }
6975
7076 if (mnauth.proRegTxHash .IsNull () || !mnauth.sig .IsValid ()) {
7177 LOCK (cs_main);
72- Misbehaving (pnode->GetId (), 100 );
78+ Misbehaving (pnode->GetId (), 100 , " invalid mnauth signature " );
7379 return ;
7480 }
7581
@@ -80,7 +86,7 @@ void CMNAuth::ProcessMessage(CNode* pnode, const std::string& strCommand, CDataS
8086 // in case he was unlucky and not up to date, just let him be connected as a regular node, which gives him
8187 // a chance to get up-to-date and thus realize by himself that he's not a MN anymore. We still give him a
8288 // low DoS score.
83- Misbehaving (pnode->GetId (), 10 );
89+ Misbehaving (pnode->GetId (), 10 , " missing mnauth masternode " );
8490 return ;
8591 }
8692
@@ -95,7 +101,7 @@ void CMNAuth::ProcessMessage(CNode* pnode, const std::string& strCommand, CDataS
95101 LOCK (cs_main);
96102 // Same as above, MN seems to not know about his fate yet, so give him a chance to update. If this is a
97103 // malicious actor (DoSing us), we'll ban him soon.
98- Misbehaving (pnode->GetId (), 10 );
104+ Misbehaving (pnode->GetId (), 10 , " mnauth signature verification failed " );
99105 return ;
100106 }
101107
0 commit comments