aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz/rpc.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-05-03 08:13:49 +0200
committerMarcoFalke <falke.marco@gmail.com>2021-05-03 08:13:53 +0200
commit320e518b9062ea5510abd7876d22dc5bd3352535 (patch)
tree633e04ecec3c0173d1b1d39d3536f6d83380d937 /src/test/fuzz/rpc.cpp
parent77d569ccb506f17978f983fe2c96cce0ba77ba40 (diff)
parent9096b13a4764873511b65f32a005ce4738b0d81c (diff)
Merge bitcoin/bitcoin#21750: net: remove unnecessary check of CNode::cs_vSend
9096b13a4764873511b65f32a005ce4738b0d81c net: remove unnecessary check of CNode::cs_vSend (Vasil Dimov) Pull request description: It is not possible to have a node in `CConnman::vNodesDisconnected` and its reference count to be incremented - all `CNode::AddRef()` are done either before the node is added to `CConnman::vNodes` or while holding `CConnman::cs_vNodes` and the object being in `CConnman::vNodes`. So, the object being in `CConnman::vNodesDisconnected` and its reference count being zero means that it is not and will not start to be used by other threads. So, the lock of `CNode::cs_vSend` in `CConnman::DisconnectNodes()` will always succeed and is not necessary. Indeed all locks of `CNode::cs_vSend` are done either when the reference count is >0 or under the protection of `CConnman::cs_vNodes` and the node being in `CConnman::vNodes`. ACKs for top commit: MarcoFalke: review ACK 9096b13a4764873511b65f32a005ce4738b0d81c 🏧 jnewbery: utACK 9096b13a4764873511b65f32a005ce4738b0d81c Tree-SHA512: 910899cdcdc8934642eb0c40fcece8c3b01b7e20a0b023966b9d6972db6a885cb3a9a04e9562bae14d5833967e45e2ecb3687b94d495060c3da4b1f2afb0ac8f
Diffstat (limited to 'src/test/fuzz/rpc.cpp')
0 files changed, 0 insertions, 0 deletions