diff options
| author | Jack Grigg <[email protected]> | 2017-06-08 16:07:49 +1200 |
|---|---|---|
| committer | Jack Grigg <[email protected]> | 2017-07-17 11:57:23 -0500 |
| commit | 1ce9f0a952a3d5d9442ad8251da898d96209c16c (patch) | |
| tree | b04830f99208d2a3db592572204dba96b70fc33b /src/pubkey.h | |
| parent | Remove redundant `= 0` initialisations (diff) | |
| download | discoin-1ce9f0a952a3d5d9442ad8251da898d96209c16c.tar.xz discoin-1ce9f0a952a3d5d9442ad8251da898d96209c16c.zip | |
Ensure that ECDSA constant sizes are correctly-sized
Diffstat (limited to 'src/pubkey.h')
| -rw-r--r-- | src/pubkey.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pubkey.h b/src/pubkey.h index 6e25ad7c4..a508c238e 100644 --- a/src/pubkey.h +++ b/src/pubkey.h @@ -48,6 +48,9 @@ private: * Its length can very cheaply be computed from the first byte. */ unsigned char vch[PUBLIC_KEY_SIZE]; + static_assert( + PUBLIC_KEY_SIZE >= COMPRESSED_PUBLIC_KEY_SIZE, + "COMPRESSED_PUBLIC_KEY_SIZE is larger than PUBLIC_KEY_SIZE"); //! Compute the length of a pubkey with a given first byte. unsigned int static GetLen(unsigned char chHeader) |