From 3ab2ab3e7691dadf91ef39ed477e12f0144b8278 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Mon, 8 Aug 2016 13:49:42 +0100 Subject: rct: change the simple flag to a type for future expansion --- src/wallet/wallet2.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/wallet/wallet2.cpp') 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) { -- cgit v1.2.3