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/cryptonote_core/cryptonote_basic.h | |
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/cryptonote_core/cryptonote_basic.h')
-rw-r--r-- | src/cryptonote_core/cryptonote_basic.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/cryptonote_core/cryptonote_basic.h b/src/cryptonote_core/cryptonote_basic.h index e5a5cc6f5..b68040597 100644 --- a/src/cryptonote_core/cryptonote_basic.h +++ b/src/cryptonote_core/cryptonote_basic.h @@ -231,18 +231,21 @@ namespace cryptonote else { FIELD(rct_signatures) - if (rct_signatures.simple) + switch (rct_signatures.type) { + case rct::RCTTypeSimple: if (rct_signatures.mixRing.size() && rct_signatures.mixRing.size() != vin.size()) return false; - } - else - { + break; + case rct::RCTTypeFull: for (size_t i = 0; i < rct_signatures.mixRing.size(); ++i) { if (rct_signatures.mixRing[i].size() != vin.size()) return false; } + break; + default: + return false; } } END_SERIALIZE() |