CValidationInterface Cleanups #9725
This + #9605 + about three more and wallet updates from blocks will be in a background thread so that they do not block block connection. This PR is just some general cleanup that happened along the way or otherwise makes future changes easier. See commit messages for more details.
To fix the issue @theuni found ("The same set of conflicted transactions is sent here for each block."), I had to go rewrite a big chunk of how the mempool removal callback logic works. Now what was previously a standalone class which listens to mempool for transactions removed has gone into the ConnectTrace class, which is accessed in ActivateBestChain to generate callbacks.
Added a bunch of comments and additional commit description at @ryanofsky's request. Also, note that the reason the std::vector of conflicted transactions is passed back to ActivateBestChain as a shared_ptr is to make it easy to add that to a queue of events shared between threads later, not for anything in this function, forgot to make that clear when I mentioned this is part of a much longer patchset.
referenced this pull request
Apr 10, 2017
Apr 10, 2017
1 check passed
jnewbery left a comment
concept ACK, and weak utACK (although I'm not familiar enough with the interface to be confident that I haven't missed anything).
One nit that can be addressed in a future PR.