net_processing: validationinterface: ignore some events for bg chain
Summary:
Move some code around in PeerManagerImpl::BlockConnected, first do operations common to all chains, then exit early if the chain is the background one before doing mempool related operation.
This is a partial backport of core#27596 and core#28562
https://github.com/bitcoin/bitcoin/pull/27596/commits/1fffdd76a1bca908f55d73b64983655b14cf7432
with an addition comment from https://github.com/bitcoin/bitcoin/pull/28562/commits/a47fbe7d49e8921214ac159c558ff4ca19f98dce
Depends on D17891
This is best reviewed with git show --color-moved=dimmed_zebra
Test Plan:
ninja all check-all
Ran a full assumeutxo IBD on mainnet + functional test on dev branch
Reviewers: #bitcoin_abc, roqqit
Reviewed By: #bitcoin_abc, roqqit
Differential Revision: https://reviews.bitcoinabc.org/D17892