aboutsummaryrefslogtreecommitdiff
path: root/src/key.h
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2015-04-21 18:09:37 -0400
committerJonas Schnelli <jonas.schnelli@include7.ch>2015-05-06 17:22:46 +0200
commita574899671d428682b339ff988363ecaf7dfcd07 (patch)
treedcf40bfa5daab7b6d18a9f301eb460069859ee8c /src/key.h
parent8cf1485f3b7a976548128c0d3866747819cbea51 (diff)
downloadbitcoin-a574899671d428682b339ff988363ecaf7dfcd07.tar.xz
chaincodes: abstract away more chaincode behavior
[squashme] replace struct CCainCode with a typedef uint256 ChainCode
Diffstat (limited to 'src/key.h')
-rw-r--r--src/key.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/key.h b/src/key.h
index d3c7a28e01..b2ef801ee8 100644
--- a/src/key.h
+++ b/src/key.h
@@ -136,7 +136,7 @@ public:
bool SignCompact(const uint256& hash, std::vector<unsigned char>& vchSig) const;
//! Derive BIP32 child key.
- bool Derive(CKey& keyChild, unsigned char ccChild[32], unsigned int nChild, const unsigned char cc[32]) const;
+ bool Derive(CKey& keyChild, ChainCode &ccChild, unsigned int nChild, const ChainCode& cc) const;
/**
* Verify thoroughly whether a private key and a public key match.
@@ -155,13 +155,13 @@ struct CExtKey {
unsigned char nDepth;
unsigned char vchFingerprint[4];
unsigned int nChild;
- CChainCode chaincode;
+ ChainCode chaincode;
CKey key;
friend bool operator==(const CExtKey& a, const CExtKey& b)
{
return a.nDepth == b.nDepth && memcmp(&a.vchFingerprint[0], &b.vchFingerprint[0], 4) == 0 && a.nChild == b.nChild &&
- memcmp(&a.chaincode.data[0], &b.chaincode.data[0], 32) == 0 && a.key == b.key;
+ a.chaincode == b.chaincode && a.key == b.key;
}
void Encode(unsigned char code[74]) const;