From df6e525d834e81e138e995f94c7527d5b3084fa5 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Wed, 6 Jun 2018 03:30:00 +0000 Subject: [PATCH] More vk fixes --- src/zcash/Address.hpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/zcash/Address.hpp b/src/zcash/Address.hpp index 558777e50..fc000f60a 100644 --- a/src/zcash/Address.hpp +++ b/src/zcash/Address.hpp @@ -4,9 +4,16 @@ #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; @@ -74,7 +81,7 @@ public: } }; -class SpendingKey : public uint252 { +class SproutSpendingKey : public uint252 { public: SpendingKey() : uint252() { } SpendingKey(uint252 a_sk) : uint252(a_sk) { } @@ -86,6 +93,10 @@ public: PaymentAddress address() const; }; +typedef boost::variant PaymentAddress; +typedef boost::variant ViewingKey; +typedef boost::variant SpendingKey; + } /** Check whether a PaymentAddress is not an InvalidEncoding. */