Finish moving core data structures into core.h. #2758

pull CodeShark wants to merge 10 commits into bitcoin:master from CodeShark:CBlock-to-core changing 7 files +275 −273
  1. CodeShark commented at 12:50 AM on June 11, 2013: contributor

    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.

  2. jgarzik commented at 1:41 PM on June 11, 2013: contributor

    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.

  3. sipa commented at 2:41 PM on June 11, 2013: member

    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.

  4. BitcoinPullTester commented at 1:01 AM on June 13, 2013: none

    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.

  5. sipa commented at 3:56 PM on June 22, 2013: member

    Code changes look good to me, and move-only + method/function conversions.

    Can you rebase? #2632 caused conflicts.

  6. Moved CBlock::WriteToDisk out of CBlock to inline function WriteBlockToDisk in main.h a6dba0fdb2
  7. Moved WriteBlockToDisk implementation from main.h to main.cpp 226f821942
  8. Moved CBlock::ReadFromDisk out of CBlock to functions ReadBlockFromDisk in main.h 7db120d531
  9. Moved ReadBlockFromDisk implementation to main.cpp 8031399494
  10. Pulled DisconnectBlock out of CBlock. 5c363ed622
  11. Pulled ConnectBlock out of CBlock. f3ae51dcce
  12. Pulled AddToBlockIndex out of CBlock. 1959997afb
  13. Pulled CheckBlock out of CBlock. 38991ffa8a
  14. Pulled AcceptBlock out of CBlock. 2a4d3464fd
  15. Moved CBlock from main.h to core.h 33944573ca
  16. CodeShark commented at 3:03 AM on June 24, 2013: contributor

    Rebased

  17. jgarzik commented at 3:23 AM on June 24, 2013: contributor

    ACK code changes; didn't build or test.

  18. sipa commented at 9:44 AM on June 24, 2013: member

    ACK. Agree with code changes, individual commits look good, build works, tried unit tests, tried resync on testnet.

  19. sipa commented at 9:56 AM on June 24, 2013: member

    Dependency improvements possible now:

    • bloom.cpp: main.h -> core.h
    • chainparams.cpp: main.h -> core.h, protocol.h
  20. jgarzik referenced this in commit 64225f7ce9 on Jun 24, 2013
  21. jgarzik merged this on Jun 24, 2013
  22. jgarzik closed this on Jun 24, 2013

  23. jgarzik commented at 2:42 PM on June 24, 2013: contributor

    Updated deps directly with push to master.

  24. Bushstar referenced this in commit 3a5e7c4334 on Apr 5, 2019
  25. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 21:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me