@@ -55,9 +55,9 @@ void CMNAuth::PushMNAUTH(CNode& peer, CConnman& connman, const CActiveMasternode
5555 connman.PushMessage (&peer, CNetMsgMaker (peer.GetCommonVersion ()).Make (NetMsgType::MNAUTH, mnauth));
5656}
5757
58- PeerMsgRet CMNAuth::ProcessMessage (CNode& peer, ServiceFlags node_services, CConnman& connman, CMasternodeMetaMan& mn_metaman, const CActiveMasternodeManager* const mn_activeman ,
59- const CMasternodeSync& mn_sync , const CDeterministicMNList& tip_mn_list ,
60- std::string_view msg_type, CDataStream& vRecv)
58+ MessageProcessingResult CMNAuth::ProcessMessage (CNode& peer, ServiceFlags node_services, CConnman& connman, CMasternodeMetaMan& mn_metaman,
59+ const CActiveMasternodeManager* const mn_activeman , const CMasternodeSync& mn_sync ,
60+ const CDeterministicMNList& tip_mn_list, std::string_view msg_type, CDataStream& vRecv)
6161{
6262 assert (mn_metaman.IsValid ());
6363
@@ -71,30 +71,30 @@ PeerMsgRet CMNAuth::ProcessMessage(CNode& peer, ServiceFlags node_services, CCon
7171
7272 // only one MNAUTH allowed
7373 if (!peer.GetVerifiedProRegTxHash ().IsNull ()) {
74- return tl::unexpected{ MisbehavingError{100 , " duplicate mnauth" } };
74+ return MisbehavingError{100 , " duplicate mnauth" };
7575 }
7676
7777 if ((~node_services) & (NODE_NETWORK | NODE_BLOOM)) {
7878 // either NODE_NETWORK or NODE_BLOOM bit is missing in node's services
79- return tl::unexpected{ MisbehavingError{100 , " mnauth from a node with invalid services" } };
79+ return MisbehavingError{100 , " mnauth from a node with invalid services" };
8080 }
8181
8282 if (mnauth.proRegTxHash .IsNull ()) {
83- return tl::unexpected{ MisbehavingError{100 , " empty mnauth proRegTxHash" } };
83+ return MisbehavingError{100 , " empty mnauth proRegTxHash" };
8484 }
8585
8686 if (!mnauth.sig .IsValid ()) {
8787 LogPrint (BCLog::NET_NETCONN, " CMNAuth::ProcessMessage -- invalid mnauth for protx=%s with sig=%s\n " ,
8888 mnauth.proRegTxHash .ToString (), mnauth.sig .ToString (false ));
89- return tl::unexpected{ MisbehavingError{100 , " invalid mnauth signature" } };
89+ return MisbehavingError{100 , " invalid mnauth signature" };
9090 }
9191
9292 const auto dmn = tip_mn_list.GetMN (mnauth.proRegTxHash );
9393 if (!dmn) {
9494 // in case node was unlucky and not up to date, just let it be connected as a regular node, which gives it
9595 // a chance to get up-to-date and thus realize that it's not a MN anymore. We still give it a
9696 // low DoS score.
97- return tl::unexpected{ MisbehavingError{10 , " missing mnauth masternode" } };
97+ return MisbehavingError{10 , " missing mnauth masternode" };
9898 }
9999
100100 uint256 signHash;
@@ -114,7 +114,7 @@ PeerMsgRet CMNAuth::ProcessMessage(CNode& peer, ServiceFlags node_services, CCon
114114 if (!mnauth.sig .VerifyInsecure (dmn->pdmnState ->pubKeyOperator .Get (), signHash, false )) {
115115 // Same as above, MN seems to not know its fate yet, so give it a chance to update. If this is a
116116 // malicious node (DoSing us), it'll get banned soon.
117- return tl::unexpected{ MisbehavingError{10 , " mnauth signature verification failed" } };
117+ return MisbehavingError{10 , " mnauth signature verification failed" };
118118 }
119119
120120 if (!peer.IsInboundConn ()) {
0 commit comments