HomePhabricator

[net processing] ignore tx GETDATA from blocks-only peers

Description

[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

Details

Provenance
Amiti Uttarwar <amiti@uttarwar.org>Authored on Jan 28 2021, 06:59
PiRKCommitted on Jan 28 2021, 07:00
abc-botPushed on Jan 28 2021, 07:04
Reviewer
Restricted Project
Differential Revision
D9083: [net processing] ignore tx GETDATA from blocks-only peers
Parents
rABC4770199b7a78: refactor: Apply override specifier consistently
Branches
Unknown
Tags
Unknown