rct: change the simple flag to a type

for future expansion
This commit is contained in:
moneromooo-monero
2016-08-08 13:49:42 +01:00
parent c5be4b0bea
commit 3ab2ab3e76
8 changed files with 46 additions and 25 deletions

View File

@@ -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)
{