From 2ce277db5d689e77d4852281bde3d6b2d1d70023 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Wed, 6 Jun 2018 05:18:53 +0000 Subject: [PATCH] Viewing key changes are on their own branch now --- src/zcash/Address.cpp | 12 ------------ src/zcash/Address.hpp | 22 +--------------------- 2 files changed, 1 insertion(+), 33 deletions(-) diff --git a/src/zcash/Address.cpp b/src/zcash/Address.cpp index 1c8dbf2de..baefeae4e 100644 --- a/src/zcash/Address.cpp +++ b/src/zcash/Address.cpp @@ -37,15 +37,3 @@ PaymentAddress SpendingKey::address() const { } } - -bool IsValidPaymentAddress(const libzcash::PaymentAddress& zaddr) { - return zaddr.which() != 0; -} - -bool IsValidViewingKey(const libzcash::ViewingKey& vk) { - return vk.which() != 0; -} - -bool IsValidSpendingKey(const libzcash::SpendingKey& zkey) { - return zkey.which() != 0; -} diff --git a/src/zcash/Address.hpp b/src/zcash/Address.hpp index fc000f60a..2dbe10a60 100644 --- a/src/zcash/Address.hpp +++ b/src/zcash/Address.hpp @@ -4,16 +4,9 @@ #include "uint256.h" #include "uint252.h" #include "serialize.h" -#include namespace libzcash { -class InvalidEncoding { -public: - friend bool operator==(const InvalidEncoding &a, const InvalidEncoding &b) { return true; } - friend bool operator<(const InvalidEncoding &a, const InvalidEncoding &b) { return true; } -}; - const size_t SerializedPaymentAddressSize = 64; const size_t SerializedViewingKeySize = 64; const size_t SerializedSpendingKeySize = 32; @@ -81,7 +74,7 @@ public: } }; -class SproutSpendingKey : public uint252 { +class SpendingKey : public uint252 { public: SpendingKey() : uint252() { } SpendingKey(uint252 a_sk) : uint252(a_sk) { } @@ -93,19 +86,6 @@ public: PaymentAddress address() const; }; -typedef boost::variant PaymentAddress; -typedef boost::variant ViewingKey; -typedef boost::variant SpendingKey; - } -/** Check whether a PaymentAddress is not an InvalidEncoding. */ -bool IsValidPaymentAddress(const libzcash::PaymentAddress& zaddr); - -/** Check whether a ViewingKey is not an InvalidEncoding. */ -bool IsValidViewingKey(const libzcash::ViewingKey& vk); - -/** Check whether a SpendingKey is not an InvalidEncoding. */ -bool IsValidSpendingKey(const libzcash::SpendingKey& zkey); - #endif // ZC_ADDRESS_H_