@@ -184,7 +184,6 @@ void CDKGSessionManager::ProcessMessage(CNode& pfrom, const CQuorumManager& quor
184184 }
185185
186186 if (vRecv.empty ()) {
187- LOCK (cs_main);
188187 Misbehaving (pfrom.GetId (), 100 );
189188 return ;
190189 }
@@ -197,7 +196,6 @@ void CDKGSessionManager::ProcessMessage(CNode& pfrom, const CQuorumManager& quor
197196 vRecv.Rewind (sizeof (uint8_t ));
198197
199198 if (!Params ().HasLLMQ (llmqType)) {
200- LOCK (cs_main);
201199 LogPrintf (" CDKGSessionManager -- invalid llmqType [%d]\n " , uint8_t (llmqType));
202200 Misbehaving (pfrom.GetId (), 100 );
203201 return ;
@@ -218,15 +216,13 @@ void CDKGSessionManager::ProcessMessage(CNode& pfrom, const CQuorumManager& quor
218216 if (quorumIndex == -1 ) {
219217 CBlockIndex* pQuorumBaseBlockIndex = WITH_LOCK (cs_main, return LookupBlockIndex (quorumHash));
220218 if (pQuorumBaseBlockIndex == nullptr ) {
221- LOCK (cs_main);
222219 LogPrintf (" CDKGSessionManager -- unknown quorumHash %s\n " , quorumHash.ToString ());
223220 // NOTE: do not insta-ban for this, we might be lagging behind
224221 Misbehaving (pfrom.GetId (), 10 );
225222 return ;
226223 }
227224
228225 if (!utils::IsQuorumTypeEnabled (llmqType, quorum_manager, pQuorumBaseBlockIndex->pprev )) {
229- LOCK (cs_main);
230226 LogPrintf (" CDKGSessionManager -- llmqType [%d] quorums aren't active\n " , uint8_t (llmqType));
231227 Misbehaving (pfrom.GetId (), 100 );
232228 return ;
@@ -238,14 +234,12 @@ void CDKGSessionManager::ProcessMessage(CNode& pfrom, const CQuorumManager& quor
238234 llmqParams.signingActiveQuorumCount - 1 : 0 ;
239235
240236 if (quorumIndex > quorumIndexMax) {
241- LOCK (cs_main);
242237 LogPrintf (" CDKGSessionManager -- invalid quorumHash %s\n " , quorumHash.ToString ());
243238 Misbehaving (pfrom.GetId (), 100 );
244239 return ;
245240 }
246241
247242 if (!dkgSessionHandlers.count (std::make_pair (llmqType, quorumIndex))) {
248- LOCK (cs_main);
249243 LogPrintf (" CDKGSessionManager -- no session handlers for quorumIndex [%d]\n " , quorumIndex);
250244 Misbehaving (pfrom.GetId (), 100 );
251245 return ;
0 commit comments