Only maintain CKeyID for the transparent part of ZcashdUnifiedAddress
This commit is contained in:
parent
cfee863644
commit
0fe1134337
|
@ -355,7 +355,7 @@ std::optional<ZcashdUnifiedAddress> ZcashdUnifiedFullViewingKey::Address(diversi
|
|||
|
||||
CExtPubKey childKey;
|
||||
if (changeKey.Derive(childKey, childIndex.value())) {
|
||||
ua.transparentKey = childKey.pubkey;
|
||||
ua.transparentAddress = childKey.pubkey.GetID();
|
||||
} else {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
|
|
@ -314,15 +314,15 @@ class ZcashdUnifiedFullViewingKey;
|
|||
class ZcashdUnifiedAddress {
|
||||
private:
|
||||
diversifier_index_t diversifier_index;
|
||||
std::optional<CPubKey> transparentKey; //TODO: should this just be the public key hash?
|
||||
std::optional<CKeyID> transparentAddress;
|
||||
std::optional<SaplingPaymentAddress> saplingAddress;
|
||||
|
||||
friend class ZcashdUnifiedFullViewingKey;
|
||||
|
||||
ZcashdUnifiedAddress() {}
|
||||
public:
|
||||
const std::optional<CPubKey>& GetTransparentKey() const {
|
||||
return transparentKey;
|
||||
const std::optional<CKeyID>& GetTransparentAddress() const {
|
||||
return transparentAddress;
|
||||
}
|
||||
|
||||
const std::optional<SaplingPaymentAddress>& GetSaplingPaymentAddress() const {
|
||||
|
|
Loading…
Reference in New Issue