HomePhabricator

[avalanche] Reset the proof tracking state on peer disconnection

Description

[avalanche] Reset the proof tracking state on peer disconnection

Summary:
This makes it possible to select another peer for requesting a proof if
the one currently selected get disconnected.

This introduces a lock order inversion found by TSAN for which I added
an exception: during shutdown the cs_main locks is hold before calling
CConnman::StopNodes(). This lock is held (as well as cs_orphans) for
the sake of fixing a potential lock order invertion already that could
only occur during shutdown.

Depends on D9599.

Test Plan:

ninja all check

With and without TSAN:

./test/functional/test_runner.py p2p_inv_download

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Maniphest Tasks: T1611

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

Details

Provenance
FabienAuthored on May 28 2021, 13:03
FabienPushed on Jun 4 2021, 19:40
Reviewer
Restricted Project
Differential Revision
D9600: [avalanche] Reset the proof tracking state on peer disconnection
Parents
rABCd86ccb5a2564: [avalanche] Manage the notfound messages from a proof request
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task