diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-08-08 13:49:42 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-08-28 21:30:14 +0100 |
commit | 3ab2ab3e7691dadf91ef39ed477e12f0144b8278 (patch) | |
tree | 4ca65b04438221bc8398f0ae8b5f40b95abfaad2 /src/wallet | |
parent | rct: avoid the need for the last II element (diff) | |
download | monero-3ab2ab3e7691dadf91ef39ed477e12f0144b8278.tar.xz |
rct: change the simple flag to a type
for future expansion
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/wallet2.cpp | 10 |
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) { |