Skip to content

Commit

Permalink
Merge #6514: refactor: drop unneeded cs_main lock
Browse files Browse the repository at this point in the history
0555d0e refactor: drop unneeded cs_main lock (Pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  Don't lock cs_main where not needed

  ## What was done?
  Don't hold cs_main where annotations don't say it's needed

  ## How Has This Been Tested?
  Compiled w/o error

  ## Breaking Changes
  None

  ## Checklist:
    _Go over all the following points, and put an `x` in all the boxes that apply._
  - [ ] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  UdjinM6:
    utACK 0555d0e
  knst:
    utACK 0555d0e

Tree-SHA512: b32fcc9d107e34388f219245c9358dfc32a317ed5f334ff0268ca2a114d0799af04af310af74709a272db5ad216599f8920d91ba0f3e988b1853f2cb6714be96
  • Loading branch information
PastaPastaPasta committed Dec 28, 2024
2 parents af43eaf + 0555d0e commit cddc93f
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/llmq/dkgsessionhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,6 @@ bool ProcessPendingMessageBatch(const CConnman& connman, CDKGSession& session, C

auto badNodes = BatchVerifyMessageSigs(session, preverifiedMessages);
if (!badNodes.empty()) {
LOCK(cs_main);
for (auto nodeId : badNodes) {
LogPrint(BCLog::LLMQ_DKG, "%s -- failed to verify signature, peer=%d\n", __func__, nodeId);
pendingMessages.Misbehaving(nodeId, 100, peerman);
Expand Down

0 comments on commit cddc93f

Please sign in to comment.