HomePhabricator

Abstract out the TxRequestTracker public interface

Description

Abstract out the TxRequestTracker public interface

Summary:
There is zero conceptual need for such an interface as there is no plan
to have different implementations, but this allows for declaring the
public methods in the header without having to pull all the internals
into the public space. This will become relevant when the
TxRequestTracker becomes a template.

Note: in order to instanciate the concrete implementation class without
knowing it, a static factory method is added to the base class. This is
unusual, as the base class is then responsible for instanciating its
child class, hardcoded (since there is a single one).

Depends on D9566.

Test Plan:

ninja all check-all
./test/functional/test_runner.py p2p_tx_download
ninja bitcoin-fuzzers

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: Mengerian, deadalnix

Maniphest Tasks: T1611

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

Details

Provenance
FabienAuthored on May 21 2021, 17:56
FabienPushed on May 27 2021, 17:52
Reviewer
Restricted Project
Differential Revision
D9567: Abstract out the TxRequestTracker public interface
Parents
rABC5f4018d6aff3: [LINTER] Add an exception for a cppcheck false positive
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task