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: memberLock annotations must be in the header, otherwise the will have limited or no effect
-
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: member
Concept ACK.
If you’re moving things around in net.h to add lock annotations, might be worth moving
NetEventsInterface
to after theCNode
definition, and making itvirtual bool SendMessages(CNode* pnode) EXCLUSIVE_LOCKS_REQUIRED(pnode->cs_sendProcessing) = 0;
.Moving
IsPeerAddrLocalGood
andAdvertiseLocal
later 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: member
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
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.
-
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, donejnewbery commented at 1:43 pm on January 6, 2021: memberACK fad2e1f267d60afe9799e431233f54f02d14e8e0
Nice tidy-up.
theStack approvedtheStack commented at 6:34 pm on January 6, 2021: memberACK 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: memberACK fad2e1f267d60afe9799e431233f54f02d14e8e0DrahtBot 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 scratchnet: Move CConnman/NetEventsInterface after CNode in header file
Can be reviewed with --color-moved=dimmed-zebra --patience
net: 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 fa210689e2MarcoFalke merged this on Jan 7, 2021MarcoFalke closed this on Jan 7, 2021
MarcoFalke 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, 2022DrahtBot 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: 2024-11-17 12:12 UTC
More mirrored repositories can be found on mirror.b10c.me