[avalanche] Fix flaky abc_p2p_getavaaddr.py test
Summary:
The getavaaddr_interval_test checks that the getavaaddr messages are accepted by the node by checking for a response. One of the condition to send addresses (and so reply to this request) is that the peer's address to share have a >= 0 availability score. The test currently ensure this by waiting for the peer to receive a poll message but this is not enough: the peer should also respond to the poll so the score is non negative.
This diff changes the test behavior to actually wait for the availability score to be > 0 (and recompute the statistics in the loop instead of only doing it once) so there is no race condition that could cause the test to be flaky.
Test Plan:
./test/functional/test_runner.py abc_p2p_getavaaddr
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Subscribers: PiRK
Differential Revision: https://reviews.bitcoinabc.org/D17613