This is part of a series of about 20 commits which split main.cpp into two - peer processing logic and blockchain/mempool/UTXO logic. Most of them arent much more intrusive than these, at least until there are large blocks of code moving.
This set focuses primarily on using CValidationinterface to handle peer-processing-logic updates when connecting/disconnecting blocks.
I haven’t significantly tested this as my normal test machine is largely unavailable atm, but most of the changes here are pretty straight-forward.