aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-08-08 13:49:42 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-08-28 21:30:14 +0100
commit3ab2ab3e7691dadf91ef39ed477e12f0144b8278 (patch)
tree4ca65b04438221bc8398f0ae8b5f40b95abfaad2 /src/wallet/wallet2.cpp
parentrct: avoid the need for the last II element (diff)
downloadmonero-3ab2ab3e7691dadf91ef39ed477e12f0144b8278.tar.xz
rct: change the simple flag to a type
for future expansion
Diffstat (limited to '')
-rw-r--r--src/wallet/wallet2.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 5d51efc12..c3fb160a0 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -211,10 +211,16 @@ static uint64_t decodeRct(const rct::rctSig & rv, const rct::key & sk, unsigned
{
try
{
- if (rv.simple)
+ switch (rv.type)
+ {
+ case rct::RCTTypeSimple:
return rct::decodeRctSimpleFromSharedSecret(rv, sk, i, mask);
- else
+ case rct::RCTTypeFull:
return rct::decodeRctFromSharedSecret(rv, sk, i, mask);
+ default:
+ LOG_ERROR("Unsupported rct type: " << rv.type);
+ return 0;
+ }
}
catch (const std::exception &e)
{