practicalswift
commented at 8:47 am on April 30, 2018:
contributor
Add Clang thread safety annotations for variables guarded by:
cs_addrLocal
cs_addrName
cs_feeFilter
cs_filter
cs_hSocket
cs_inventory
cs_mapLocalHost
cs_most_recent_block
cs_proxyInfos
cs_sendProcessing
cs_setBanned
cs_SubVer
cs_vOneShots
cs_vProcessMsg
cs_vRecv
cs_vSend
Changed files:
src/net.{cpp,h}
src/netbase.cpp
practicalswift renamed this:
Add Clang thread safety annotations for guarded variables in the networking code
net: Add Clang thread safety annotations for guarded variables in the networking code
on Apr 30, 2018
fanquake added the label
Refactoring
on Apr 30, 2018
fanquake added the label
P2P
on Apr 30, 2018
DrahtBot added the label
Needs rebase
on Jul 9, 2018
practicalswift force-pushed
on Jul 11, 2018
practicalswift
commented at 11:26 pm on July 11, 2018:
contributor
Rebased!
DrahtBot removed the label
Needs rebase
on Jul 12, 2018
MarcoFalke
commented at 10:05 pm on August 12, 2018:
member
Imo could squash everything, since most of the commits only touch 2 lines.
practicalswift force-pushed
on Aug 13, 2018
practicalswift
commented at 7:39 am on August 13, 2018:
contributor
@MarcoFalke Rebased and squashed! Please re-review :-)
practicalswift force-pushed
on Aug 30, 2018
practicalswift
commented at 1:37 pm on August 30, 2018:
contributor
Rebased and added missing lock:
0diff --git a/src/net.cpp b/src/net.cpp
1index 529a2f82f..7fcf6a3ef 100644
2--- a/src/net.cpp
3+++ b/src/net.cpp
4@@ -715,7 +715,10 @@ void CNode::copyStats(CNodeStats &stats)
5 X(nRecvBytes);
6 }
7 X(fWhitelisted);
8- X(minFeeFilter);
9+ {
10+ LOCK(cs_feeFilter);
11+ X(minFeeFilter);
12+ }
1314 // It is common for nodes with good ping times to suddenly become lagged,
15 // due to a new block arriving or other large transfer.
652@@ -653,8 +653,8 @@ class CNode
653 // to be printed out, displayed to humans in various forms and so on. So we sanitize it and
654 // store the sanitized version in cleanSubVer. The original should be used when dealing with
655 // the network or wire types and the cleaned string used when displayed or logged.
656- std::string strSubVer, cleanSubVer;
657 CCriticalSection cs_SubVer; // used for both cleanSubVer and strSubVer
658+ std::string strSubVer GUARDED_BY(cs_SubVer), cleanSubVer GUARDED_BY(cs_SubVer);
#14046 (net: Refactor message parsing (CNetMessage), adds flexibility by jonasschnelli)
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.
practicalswift force-pushed
on Oct 8, 2018
practicalswift
commented at 1:30 pm on October 8, 2018:
contributor
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: 2025-06-09 00:12 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me