[net processing] ignore tx GETDATA from blocks-only peers
Summary:
Co-Authored-By: John Newbery <john@johnnewbery.com>
Currently we'll stall peers that send us an unknown INV type in a GETDATA message. Be a bit more friendly and just drop the invalid request.
Ditto for blocks-relay-only peers that send us a GETDATA for a transaction.
There's a test for the first part. The second is difficult to test in the functional test framework since we aren't able to make blocks-relay-only connections.
This is a backport of Core PR18808 [1/4]
https://github.com/bitcoin/bitcoin/pull/18808/commits/047ceac142246b5d51056a51dbf4645b31802be4
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, majcosta
Reviewed By: #bitcoin_abc, majcosta
Differential Revision: https://reviews.bitcoinabc.org/D9083