mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
[trivial] Switched constants to sizeof()
This commit is contained in:
11
src/pubkey.h
11
src/pubkey.h
@@ -13,7 +13,7 @@
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
|
||||
/**
|
||||
/**
|
||||
* secp256k1:
|
||||
* const unsigned int PRIVATE_KEY_SIZE = 279;
|
||||
* const unsigned int PUBLIC_KEY_SIZE = 65;
|
||||
@@ -156,7 +156,7 @@ public:
|
||||
|
||||
/*
|
||||
* Check syntactic correctness.
|
||||
*
|
||||
*
|
||||
* Note that this is consensus critical as CheckSig() calls it!
|
||||
*/
|
||||
bool IsValid() const
|
||||
@@ -203,8 +203,11 @@ struct CExtPubKey {
|
||||
|
||||
friend bool operator==(const CExtPubKey &a, const CExtPubKey &b)
|
||||
{
|
||||
return a.nDepth == b.nDepth && memcmp(&a.vchFingerprint[0], &b.vchFingerprint[0], 4) == 0 && a.nChild == b.nChild &&
|
||||
a.chaincode == b.chaincode && a.pubkey == b.pubkey;
|
||||
return a.nDepth == b.nDepth &&
|
||||
memcmp(&a.vchFingerprint[0], &b.vchFingerprint[0], sizeof(vchFingerprint)) == 0 &&
|
||||
a.nChild == b.nChild &&
|
||||
a.chaincode == b.chaincode &&
|
||||
a.pubkey == b.pubkey;
|
||||
}
|
||||
|
||||
void Encode(unsigned char code[BIP32_EXTKEY_SIZE]) const;
|
||||
|
||||
Reference in New Issue
Block a user