Lock annotations must be in the header, otherwise the will have limited or no effect
net: Move SocketSendData lock annotation to header #20864
pull MarcoFalke wants to merge 2 commits into bitcoin:master from MarcoFalke:2101-netLock changing 2 files +892 −893-
MarcoFalke commented at 7:44 AM on January 6, 2021: member
- MarcoFalke added the label Refactoring on Jan 6, 2021
- MarcoFalke added the label P2P on Jan 6, 2021
-
ajtowns commented at 8:33 AM on January 6, 2021: contributor
Concept ACK.
If you're moving things around in net.h to add lock annotations, might be worth moving
NetEventsInterfaceto after theCNodedefinition, and making itvirtual bool SendMessages(CNode* pnode) EXCLUSIVE_LOCKS_REQUIRED(pnode->cs_sendProcessing) = 0;.Moving
IsPeerAddrLocalGoodandAdvertiseLocallater as well would allow removing theclass CNode;forward declaration entirely.It would be nice if there were some easy way to review pointer-becomes-reference changes.
- MarcoFalke force-pushed on Jan 6, 2021
-
MarcoFalke commented at 8:46 AM on January 6, 2021: member
It would be nice if there were some easy way to review pointer-becomes-reference changes.
Apart from
--word-diff-regex=.?SendMessages ...
Thanks, done
-
DrahtBot commented at 12:03 PM on January 6, 2021: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #20811 (refactor: move net_processing implementation details out of header by ajtowns)
- #20786 (net: [refactor] Prefer integral types in CNodeStats by MarcoFalke)
- #20729 (p2p: standardize on outbound-{full, block}-relay connection type naming by jonatack)
- #20724 (Cleanup of -debug=net log messages by ajtowns)
- #20646 (doc: refer to BIPs 339/155 in feature negotiation by jonatack)
- #20364 (Follow-ups to 19107 by troygiorshev)
- #20234 (net: don't extra bind for Tor if binds are restricted by vasild)
- #20228 (addrman: Make addrman a top-level component by jnewbery)
- #20196 (net: fix GetListenPort() to derive the proper port by vasild)
- #19843 (Refactoring and minor improvement for self-advertisements by naumenkogs)
- #19460 (multiprocess: Add bitcoin-wallet -ipcconnect option by ryanofsky)
- #19315 ([tests] Allow outbound & block-relay-only connections in functional tests. by amitiuttarwar)
- #18819 (net: Replace cs_feeFilter with simple std::atomic by MarcoFalke)
- #18077 (net: Add NAT-PMP port forwarding support by hebasto)
- #10102 ([experimental] Multiprocess bitcoin by ryanofsky)
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.
- DrahtBot cross-referenced this on Jan 6, 2021 from issue net: [refactor] Prefer integral types in CNodeStats by MarcoFalke
- DrahtBot cross-referenced this on Jan 6, 2021 from issue p2p: standardize outbound full/block relay connection type naming by jonatack
- DrahtBot cross-referenced this on Jan 6, 2021 from issue Cleanup of -debug=net log messages by ajtowns
- DrahtBot cross-referenced this on Jan 6, 2021 from issue doc: refer to BIPs 339/155 in feature negotiation by jonatack
- DrahtBot cross-referenced this on Jan 6, 2021 from issue Declare de facto const reference variables/member functions as const by practicalswift
- DrahtBot cross-referenced this on Jan 6, 2021 from issue Follow-ups to 19107 by troygiorshev
-
in src/net.h:1216 in fad2e1f267 outdated
2080 | 2081 | - /** Whether this peer is an inbound onion, e.g. connected via our Tor onion service. */ 2082 | - bool IsInboundOnion() const { return m_inbound_onion; } 2083 | + friend struct CConnmanTest; 2084 | + friend struct ConnmanTestMsg; 2085 | };
jnewbery commented at 1:40 PM on January 6, 2021:If you touch this again, add a blank line after the class declaration.
MarcoFalke commented at 8:42 AM on January 7, 2021:thanks, done
jnewbery commented at 1:43 PM on January 6, 2021: memberACK fad2e1f267d60afe9799e431233f54f02d14e8e0
Nice tidy-up.
DrahtBot cross-referenced this on Jan 6, 2021 from issue net: don't bind on 0.0.0.0 if binds are restricted to Tor by vasildDrahtBot cross-referenced this on Jan 6, 2021 from issue addrman: Make addrman a top-level component by jnewberyDrahtBot cross-referenced this on Jan 6, 2021 from issue net: fix GetListenPort() to derive the proper port by vasildDrahtBot cross-referenced this on Jan 6, 2021 from issue Refactoring and minor improvement for self-advertisements by naumenkogsDrahtBot cross-referenced this on Jan 6, 2021 from issue multiprocess: Add bitcoin-wallet -ipcconnect option by ryanofskyDrahtBot cross-referenced this on Jan 6, 2021 from issue [tests] Allow outbound & block-relay-only connections in functional tests. by amitiuttarwarDrahtBot cross-referenced this on Jan 6, 2021 from issue net: Replace cs_feeFilter with simple std::atomic by MarcoFalkeDrahtBot cross-referenced this on Jan 6, 2021 from issue net: Add NAT-PMP port forwarding support by hebastoDrahtBot cross-referenced this on Jan 6, 2021 from issue Multiprocess bitcoin by ryanofskytheStack approvedtheStack commented at 6:34 PM on January 6, 2021: contributorACK fad2e1f267d60afe9799e431233f54f02d14e8e0 With the suggestions in the commit messages on how to best show the diffs, the review was quite straight-forward and painless. 👌
ajtowns commented at 1:07 AM on January 7, 2021: contributorACK fad2e1f267d60afe9799e431233f54f02d14e8e0
ajtowns cross-referenced this on Jan 7, 2021 from issue refactor: move net_processing implementation details out of header by ajtownsDrahtBot added the label Needs rebase on Jan 7, 2021MarcoFalke force-pushed on Jan 7, 2021MarcoFalke commented at 8:39 AM on January 7, 2021: memberRebased, should be trivial to re-ACK with git range-diff or from scratch
fa0a71781anet: Move CConnman/NetEventsInterface after CNode in header file
Can be reviewed with --color-moved=dimmed-zebra --patience
fa210689e2net: Move SocketSendData lock annotation to header
Also, add lock annotation to SendMessages Can be reviewed with "--word-diff-regex=."
MarcoFalke force-pushed on Jan 7, 2021DrahtBot removed the label Needs rebase on Jan 7, 2021jnewbery commented at 9:20 AM on January 7, 2021: memberutACK fa210689e2
MarcoFalke merged this on Jan 7, 2021MarcoFalke closed this on Jan 7, 2021MarcoFalke deleted the branch on Jan 7, 2021sidhujag referenced this in commit 52a356407c on Jan 7, 2021Fabcien referenced this in commit 018d4cef0c on Jan 25, 2022Fabcien referenced this in commit 13db675708 on Jan 25, 2022bitcoin locked this on Aug 16, 2022
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-19 06:53 UTC