Page MenuHomePhabricator

net_processing: move CNode data access out of lock
ClosedPublic

Authored by PiRK on Oct 31 2023, 12:36.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCa47ba0f32e18: net_processing: move CNode data access out of lock
Summary

CNode::m_relays_tx and CNode::m_bloom_filter_loaded access don't require
the Peer::TxRelay::m_bloom_filter_mutex lock, so move them out of the
lock scope.

See https://github.com/bitcoin/bitcoin/pull/21160#discussion_r736785417
and https://github.com/bitcoin/bitcoin/pull/21160#discussion_r736785662.

Backport of core#24692
https://github.com/bitcoin/bitcoin/pull/24692/commits/21154ff9270e4bbae02d9012a4a73cce86a00334

Depends on D14711

Note that only one commit of that PR is applicable. The constness of peer in PushNodeVersion was fixed in D14710 and the fuzzers changes would require more fuzzer backports.

Test Plan

ninja all check-all