Assert compressed keys are strictly shorter than regular #12459

pull Empact wants to merge 1 commits into bitcoin:master from Empact:assert-compressed-smaller changing 2 files +4 −4
  1. Empact commented at 8:37 PM on February 16, 2018: member

    This is a stricter and more meaningful test.

  2. Assert compressed keys are strictly shorter than regular
    This is a stricter and more meaningful test.
    9e65cd3b62
  3. in src/key.h:41 in 005abd6830 outdated
      36 | @@ -37,8 +37,8 @@ class CKey
      37 |       * script supports up to 75 for single byte push
      38 |       */
      39 |      static_assert(
      40 | -        PRIVATE_KEY_SIZE >= COMPRESSED_PRIVATE_KEY_SIZE,
      41 | -        "COMPRESSED_PRIVATE_KEY_SIZE is larger than PRIVATE_KEY_SIZE");
      42 | +        PRIVATE_KEY_SIZE > COMPRESSED_PRIVATE_KEY_SIZE,
      43 | +        "COMPRESSED_PRIVATE_KEY_SIZE should be smaller than PRIVATE_KEY_SIZE");
    


    fivepiece commented at 8:56 PM on February 16, 2018:

    should be smaller

    Compressed private keys are indeed larger than uncompressed ones.


    Empact commented at 9:41 PM on February 16, 2018:

    This test is relative to the *_SIZE constant values, which are defined above and do have this relationship.


    fivepiece commented at 9:50 PM on February 16, 2018:

    Ah I see, should've expanded the lines :)

  4. Empact force-pushed on Feb 20, 2018
  5. Empact renamed this:
    Assert compressed / compact keys and sigs are strictly shorter than regular
    Assert compressed keys are strictly shorter than regular
    on Feb 20, 2018
  6. laanwj added the label Tests on Feb 22, 2018
  7. practicalswift commented at 4:35 PM on February 24, 2018: contributor

    Concept ACK

  8. Empact commented at 10:11 AM on April 12, 2018: member

    Closing as insignificant.

  9. Empact closed this on Apr 12, 2018

  10. 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-22 09:15 UTC

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