Skip to content

Commit

Permalink
Do not hold cs_vNodes in CSigSharesManager::SendMessages() for too lo…
Browse files Browse the repository at this point in the history
  • Loading branch information
UdjinM6 authored and panleone committed Oct 30, 2024
1 parent a29d294 commit 9b56ef5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/llmq/quorums_signing_shares.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,9 @@ bool CSigSharesManager::SendMessages()

bool didSend = false;

g_connman->ForEachNode([&](CNode* pnode) {
std::vector<CNode*> vNodesCopy = g_connman->CopyNodeVector(CConnman::FullyConnectedOnly);

for (auto& pnode : vNodesCopy) {
CNetMsgMaker msgMaker(pnode->GetSendVersion());

auto it1 = sigSessionAnnouncements.find(pnode->GetId());
Expand Down Expand Up @@ -1133,9 +1135,10 @@ bool CSigSharesManager::SendMessages()
didSend = true;
}
}
}

return true;
});
// looped through all nodes, release them
g_connman->ReleaseNodeVector(vNodesCopy);

return didSend;
}
Expand Down

0 comments on commit 9b56ef5

Please sign in to comment.