This pull request is the completion of #2154.
The original intention was to also move CBlock into core.h but was postponed in the interest of merging what had already been done.
Code appears correct to me. Conditional ACK -- ACK iff other devs agree that pulling this code out of CBlock is the right thing to do.
Yes, I agree this code should be pulled out of CBlock. Reason: having a definition of a Bitcoin block available without needing to depend on all storage/validation logic (which on itself pulls in pretty much the whole project as dependencies).
Agree with the less generic names. Longer term, this should be dealt with using namespace, but that's not something to do incrementally, IMHO.
EDIT: Note, I haven't actually checked the code of this pullreq.
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/a4a5e834754cf2b996a857459e1bd8e118bba4db for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.
Rebased
ACK code changes; didn't build or test.
ACK. Agree with code changes, individual commits look good, build works, tried unit tests, tried resync on testnet.
Dependency improvements possible now:
Updated deps directly with push to master.