HomePhabricator

Split the cs_main lock in SendMessages

Description

Split the cs_main lock in SendMessages

Summary:
The PeerManager::SendMessages() method locks the cs_main for almost
the whole function. This diff splits the lock into pieces, slightly
reducing the scope and making it possible to later add avalanche parts
that don't lock cs_main.

Test Plan:
With clang and debug:

ninja all check-all
./test/functional/test_runner.py p2p_tx_download # extended

Run the TSAN build.

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D9558

Details

Provenance
FabienAuthored on May 20 2021, 14:44
FabienPushed on May 20 2021, 18:51
Reviewer
Restricted Project
Differential Revision
D9558: Split the cs_main lock in SendMessages
Parents
rABC18e8a1f0c9cf: Report and verify expirations
Branches
Unknown
Tags
Unknown