Add explicit numeric constant value for all opcodes #1129

pull laanwj wants to merge 3 commits into bitcoin:master from laanwj:2012_04_opcodes changing 4 files +121 −129
  1. laanwj commented at 8:30 AM on April 21, 2012: member
    • Easier for debugging (what opcode was 0x... again?)
    • Clarifies that the opcodes are set in stone in the protocol, and signals that it is impossible to insert opcodes in between.

    I've checked that the old and new representation are exactly the same, see http://pastebin.com/dnsyyfFD for testcase. This needs careful scrutiny though.

    Edit: also added commit to change type of CMerkleTx::fMerkleVerified (and other in-memory-only flags) from char to bool. It is always (only 3 occurences) used as bool, so this is better.

    Edit.2: also removed some GUI hints in the bitcoin core, which were remnants from Wx.

  2. Add explicit numeric constant value for all opcodes
    - Easier for debugging (what opcode was 0x... again?)
    - Clarifies that the opcodes are set in stone in the protocol, and signals that it is impossible to insert opcodes in between.
    7be8b2ff9c
  3. jgarzik commented at 3:09 PM on April 21, 2012: contributor

    although the pastebin test seems accurate, I would have preferred one that directly includes both old and new enum{} lists... add prefix OLD_ to each symbol in old enum, and then script-create a test that tests OLD_FOO==FOO, for each symbol.

    ACK on the concept

  4. laanwj commented at 3:59 PM on April 21, 2012: member

    Done that: http://pastebin.com/GtjjXRZM

    I've also diffed the disassemblies (with only commit 7be8b2f): http://pastebin.com/fTvGwW94 (difference in version.o is explained by different git commit, apart from that there are no differences)

  5. change type of various bare chars to bool that are only used as bool (and never serialized) cdcc319c2d
  6. Remove no-longer used UI hints in bitcoin core
    The Qt UI has its own associated structures for temporary transaction state / cache.
    b6c837cbe1
  7. jgarzik commented at 7:45 PM on April 21, 2012: contributor

    ACK

  8. sipa commented at 9:04 PM on April 21, 2012: member

    ACK

  9. gavinandresen commented at 11:23 PM on April 21, 2012: contributor

    ACK

  10. sipa referenced this in commit d5eb41fa08 on Apr 21, 2012
  11. sipa merged this on Apr 21, 2012
  12. sipa closed this on Apr 21, 2012

  13. coblee referenced this in commit 9e326042f2 on Jul 17, 2012
  14. laanwj deleted the branch on Apr 9, 2014
  15. suprnurd referenced this in commit eb92933d52 on Dec 5, 2017
  16. lateminer referenced this in commit d0e3ea2674 on Jan 22, 2019
  17. lateminer referenced this in commit a87bfc32a0 on Dec 25, 2019
  18. DrahtBot locked this on Sep 8, 2021

Milestone
0.6.1


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-13 15:16 UTC

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