Do not send (potentially) invalid headers in response to getheaders
commit3788a8479b4efd481f3e91419bcf347113375112
authorMatt Corallo <git@bluematt.me>
Mon, 30 Oct 2017 14:41:05 +0000 (30 10:41 -0400)
committerMatt Corallo <git@bluematt.me>
Mon, 30 Oct 2017 22:59:07 +0000 (30 18:59 -0400)
tree954a19df5645cf2ba58950c20e46e4c16c2b0678
parentbb9ab0fccfbadd5c032a2cd0bb3135049cffa42b
Do not send (potentially) invalid headers in response to getheaders

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. On my public node I have not seen any
such request (whether for an invalid block or not) in at least two
years of debug.log output, indicating that this should have minimal
impact.
src/net_processing.cpp