Matt pointed out to me that this appeared to be doing nothing (except involving itself in data races).
Also removes pnodeLocalHost.
Matt pointed out to me that this appeared to be doing nothing (except involving itself in data races).
Also removes pnodeLocalHost.
Have I missed something here? I just don't want to be left out of the finds-code-he-doesn't-understand-so-opens-a-pr-to-remove-it club!
5241 | @@ -5242,8 +5242,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, 5242 | { 5243 | pfrom->SetRecvVersion(min(pfrom->nVersion, PROTOCOL_VERSION)); 5244 | 5245 | - // Mark this node as currently connected, so we update its timestamp later. 5246 | - if (pfrom->fNetworkNode) { 5247 | + { 5248 | + // Mark this node as currently connected, so we update its timestamp later.
I believe this should now be if (!pfrom->fInbound) to avoid changing behavior, as it is used to decide whether to call addrman.Connected from DeleteNode.
I believe we should be addrman.Connected(pnode->addr) on inbound connections too. I could document this better in the commit message.
Hm perhaps not, okay I reasoned myself out of that. I'll change it.
You might also remove pnodeLocalHost as well, since, afaict, it makes fNetworkNode a synonym for !fInbound.
Matt pointed out to me that this appeared to be doing nothing (except involving itself in data races).
Mostly a legacy of the long removed pub/sub system.
Slightly-tested ACK bdb922b34c9a477c4ebf358653f6bcfb9bee48ce
Aww, I was looking forward to nuking a bunch of this useless stuff all at once :)
utACK
utACK bdb922b34c9a477c4ebf358653f6bcfb9bee48ce
Lightly tested ACK bdb922b (though I have zero idea what this pnodeLocalHost thing was ever for).
Oh wow, I'm surprised this stuck around for so long as it is indeed used nowhere. Good find! utACK https://github.com/bitcoin/bitcoin/commit/bdb922b34c9a477c4ebf358653f6bcfb9bee48ce