1918+ {
1919+ LOCK(cs_main);
1920+ mapBlockSource.emplace(pblock->GetHash(), std::make_pair(pfrom->GetId(), false));
1921+ }
1922+ bool fNewBlock = false;
1923+ ProcessNewBlock(chainparams, pblock, true, &fNewBlock);
This appears to be a novel use of fForceProcessing
(not non-network nor whitelist peer), might want to note that in the argument description.
The documentation is just flat out wrong, it seems. fForceProcessing means “make sure to store this to disk, we decided we wanted to request this block for some reason, so probably want it no matter what validation.cpp thinks”. Indeed, the use here is slightly different from elsewhere, but given that we already check for blocks which do not mesh with our idea of the best chain further up, and that we will only get here if the block was within two blocks of our tip, I’m pretty confident this is the right use.