Encapsulate & protect core class COutPoint #4662

pull jgarzik wants to merge 1 commits into bitcoin:master from jgarzik:2014_encaps_core changing 25 files +126 −143
  1. jgarzik commented at 5:17 PM on August 8, 2014: contributor

    A bit of an exploration, to see if we want to do this.

  2. jgarzik added the label Improvement on Aug 8, 2014
  3. jgarzik added the label Priority Low on Aug 8, 2014
  4. Encapsulate & protect COutPoint core structure ed6d34baf4
  5. BitcoinPullTester commented at 10:32 PM on August 11, 2014: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/p4662_ed6d34baf45a9520043982aea9c97691e51badf7/ 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.

  6. laanwj commented at 3:27 AM on August 21, 2014: member

    I know that this is the "OO-way", but I'm not sure there is any advantage to regarding CTxOut as an opaque, encapsulated object instead of just a dumb core data structure. We all know very well what is in it, we're fairly sure it won't change (unless the blockchain protocol changes), so the advantage of practising data hiding is uncertain.

    However, it pretty much a matter of taste and I'm not against this either.

  7. petertodd commented at 5:35 AM on August 21, 2014: contributor

    Yeah, I'd lean towards "dumb core data structure" myself. Given it's consensus critical, having all the details be directly visible is probably not a bad thing.

    Of course, I'm biased as then it'd make python-bitcoinlib be different than the core codebase it's meant to copy; I'd have to at least update the README. ;)

  8. TheBlueMatt commented at 11:25 PM on August 21, 2014: member

    I have to agree with the two above. Keeping it a POD non-OO structure seems cleaner to me, despite the non-OO look.

  9. jgarzik commented at 2:00 AM on August 22, 2014: contributor

    That's fine. As noted, this was speculative. Closing. POD alive and free.

  10. jgarzik closed this on Aug 22, 2014

  11. jgarzik deleted the branch on Aug 24, 2014
  12. MarcoFalke 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-20 00:15 UTC

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