fa81773243 style-only: Remove whitespace (MarcoFalke)
fae77b9e6d net: Simplify ProcessGetBlockData execution by removing send flag. (Patrick Strateman)
fae7c0429f log: Clarify that block request below NODE_NETWORK_LIMITED_MIN_BLOCKS disconnects (MarcoFalke)
Pull request description:
* Clarify that "ignoring" really means "disconnect" in the log
* Revive a refactor I took from #13670
ACKs for top commit:
jnewbery:
utACK fa81773243
sipa:
utACK fa81773243
Tree-SHA512: 0a4fcb979cb82c4e26012881eeaf903c38dfbb85d461476c01e35294760744746a79c48ffad827fe31c1b830f40c6e4240529c71e375146e4d0313c3b7d784ca
// Avoid leaking prune-height by never sending blocks below the NODE_NETWORK_LIMITED threshold
if(send&&!pfrom.HasPermission(PF_NOBAN)&&(
if(!pfrom.HasPermission(PF_NOBAN)&&(
(((pfrom.GetLocalServices()&NODE_NETWORK_LIMITED)==NODE_NETWORK_LIMITED)&&((pfrom.GetLocalServices()&NODE_NETWORK)!=NODE_NETWORK)&&(m_chainman.ActiveChain().Tip()->nHeight-pindex->nHeight>(int)NODE_NETWORK_LIMITED_MIN_BLOCKS+2/* add two blocks buffer extension for possible races */))
)){
LogPrint(BCLog::NET,"Ignore block request below NODE_NETWORK_LIMITED threshold from peer=%d\n",pfrom.GetId());