Change Description
This updates compact block peer selection so an assumeutxo node can request compact block announcements after its active snapshot chainstate is close enough to tip, even while historical background validation is still running.
Previously, BlockChecked() only selected high-bandwidth compact block peers when IsInitialBlockDownload() was false. During assumeutxo background validation, that can keep compact block relay disabled even though the active chainstate has already synced to the network tip and the mempool can be used for compact block reconstruction.
The new helper keeps the existing behavior outside of assumeutxo, and only permits compact block announcements during IBD when:
- the current chainstate is snapshot-based,
- the snapshot is still marked
UNVALIDATED, and CanDirectFetch()says the active tip is close enough to the network tip.
Fixes #33431.
Testing
git diff --check- Attempted CMake configure with
cmake -B build -S . -DBUILD_GUI=OFF -DBUILD_BENCH=OFF -DBUILD_FUZZ_BINARY=OFF -DWITH_ZMQ=OFF -DWITH_USDT=OFF -DWITH_MULTIPROCESS=OFF; configure stopped because Boost >= 1.74 is not installed in this local environment.
The snapshot walks forward while the old chain whispers behind it.