Some BIP157 light clients are not complying with the following requirement:
StopHash MUST be known to belong to a block accepted by the receiving peer. This is the case if the peer had previously sent a
headersorinvmessage with that block or any descendents. A node that receives [getcf(ilter|header|checkpt)s]with an unknown StopHash SHOULD NOT respond.
https://github.com/bitcoin/bips/blob/master/bip-0157.mediawiki#getcfilters
During the recent 2-block reorg I observed on one node’s logs that it disconnected BIP157 peers with the version string /btcwire:0.5.0/neutrino:0.12.0-beta/ for asking for filters from the other side of the block race:
0[net] peer requested invalid block hash: 95b0d0f836f18d78dfbae435fb37bf6fff2e37a4fc01c20be8495bc3ea4fbb58, disconnecting peer=8502032, [...]
The broken implementations should fix themselves, but disconnecting is too harsh of a punishment for this mistake, this PR keeps the log message and returns early without responding when this happens, but doesn’t set fDisconnect=true.