Pre v0.10.0, though, there were a few places where AcceptBlock
was called without going through ProcessNewBlock
first. I checked out v0.9.5 and did a git grep
, seesuspect this is an artifact of the results here: http://pastebin.com/Qc9if0Mbway the code used to work.
As to why it hasn't been taken out, it's probably just out of caution, or a "Don't fix it if it's not broken" mindset. Bitcoin Core coders are very cautious, and reasonably so since it's a piece of software that is the main interface to the network for many big players in the industry.
In addition, on master right now, CheckBlock
contains a check at the beginning to avoid doing the same work twice. (Added in this commit.)
if (block.fChecked)
return true;