[META] This commit should be followed up by removing the comments and assertions meant only to show that the change is correct.
GetLastCheckPoint mainly acts on BlockManager.
This is a partial backport of core#20749 [7/17] and core#15655
https://github.com/bitcoin/bitcoin/pull/20749/commits/f11d11600ddb0ddff6538250ae2a35df6112c3db
https://github.com/bitcoin/bitcoin/pull/15655/commits/418d3230f86f77dde6e817f502baff8a54b707fa
Depends on D11175
Notes:
- moving code from checkpoints.cpp to validation.cpp (which is huge already) may not seem great from a code quality perspective, but it will eventually be moved to it separate blockmanager.cpp file anyway.
- we cannot remove checkpoint.{h,cpp} because of D1308 which resurrected Checkpoints::CheckBlock