net: Add missing cs_vNodes lock#18458
Conversation
|
Concept ACK Very nice to see a FWIW: |
fa75ce8 to
fa2a6b6
Compare
promag
left a comment
There was a problem hiding this comment.
Concept ACK.
How about split CConnman::Stop? In Shutdown(NodeContext& node) we would then have:
if (node.connman) {
node.connman->BeforeStop();
LOCK2(::cs_main, ::g_cs_orphans);
node.connman->Stop();
}You could also add annotation to Stop.
|
Took suggestion by @promag
No, that would be incorrect. The locks are not needed for the correct functionality of the connection manager itself. They are only needed when the connection manager is used in the context of a full node that also runs net processing and a scheduler. I think init.cpp is the best place to document this, since that is the place where the full node gets pieced together. |
|
Code review ACK fa36965. |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
Would be nice to get one or two more ACKs on this |
|
ACK ACK, you are welcome. |
|
ACK fa36965 |
fa36965 net: Add missing cs_vNodes lock (MarcoFalke) Pull request description: Fixes bitcoin#18457 ACKs for top commit: promag: Code review ACK fa36965. laanwj: ACK fa36965 Tree-SHA512: 60d7000f2f3d480bb0953ce27a0020763e7102da16a0006b619e0a236cfc33cbd4f83d870e9f0546639711cd877c1f9808d419184bbc153bb328885417e0066c
Summary: Backport of core [[bitcoin/bitcoin#18458 | PR18458]]. Test Plan: With Clang as a compiler: cmake -GNinja .. -DCMAKE_BUILD_TYPE=Debug ninja all check-all Reviewers: #bitcoin_abc, majcosta Reviewed By: #bitcoin_abc, majcosta Differential Revision: https://reviews.bitcoinabc.org/D8443
Fixes #18457