[seeder] Fix such that seeder node awaits both headers and addr messages
Summary:
The current code assumes that if the ADDR message arrives, the node
is done. As such, it can miss out on the HEADERS message and incorrectly
mark nodes as bad.
This commit fixes the situation by making it that the node must both
receive ADDR messages *and* HEADERS messages to be satisfied.
Note that in some cases it won't be expecting ADDR messages (if
calling code didn't supply a vAddr pointer), and so in that case it will
just await a HEADERS reply iff we have a checkpoint.
With this commit, the seeder header verification facility should be working
now as expected.
Note that we had to update the unit tests to work ok with the logic
changes.
This is a partial backport of bchn#1820
https://gitlab.com/bitcoin-cash-node/bitcoin-cash-node/-/merge_requests/1820/diffs?commit_id=4f544286f0e2092e0eb466708784f041d5462645
Depends on D16500
Test Plan: TBD (we need to run the seeder for a very long time or else tweak some code to make the node acceptation logic faster)
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D16908