This is a stricter and more meaningful test.
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-
Empact commented at 8:37 PM on February 16, 2018: member
-
9e65cd3b62
Assert compressed keys are strictly shorter than regular
This is a stricter and more meaningful test.
-
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 :)
Empact force-pushed on Feb 20, 2018Empact renamed this:Assert compressed / compact keys and sigs are strictly shorter than regular
Assert compressed keys are strictly shorter than regular
on Feb 20, 2018laanwj added the label Tests on Feb 22, 2018practicalswift commented at 4:35 PM on February 24, 2018: contributorConcept ACK
Empact commented at 10:11 AM on April 12, 2018: memberClosing as insignificant.
Empact closed this on Apr 12, 2018MarcoFalke locked this on Sep 8, 2021ContributorsLabels
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 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
More mirrored repositories can be found on mirror.b10c.me