HomePhabricator

Do not send (potentially) invalid headers in response to getheaders

Description

Do not send (potentially) invalid headers in response to getheaders

Summary:
Nowhere else in the protocol do we send headers which are for
blocks we have not fully validated except in response to getheaders
messages with a null locator.

Backport of core PR11580

Depends on D2226

Test Plan:

./test/functional/test_runner.py sendheaders

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: teamcity, schancel

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