aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-08-27 10:30:34 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-08-28 21:30:40 +0100
commita0925e628ebae82a57acffb2824e2e4232b3ebb6 (patch)
tree782429912bc41c2d345048c4e334776fc7dd4815 /src/cryptonote_core
parentrct: early out on failure on verRange (diff)
downloadmonero-a0925e628ebae82a57acffb2824e2e4232b3ebb6.tar.xz
core: use full rct signatures if just one input
It is slightly smaller, but requires all rings to have the real input on the same index, so can only be used for single input txes.
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r--src/cryptonote_core/cryptonote_format_utils.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cryptonote_core/cryptonote_format_utils.cpp b/src/cryptonote_core/cryptonote_format_utils.cpp
index cbaf11398..32b96f1fc 100644
--- a/src/cryptonote_core/cryptonote_format_utils.cpp
+++ b/src/cryptonote_core/cryptonote_format_utils.cpp
@@ -656,7 +656,10 @@ namespace cryptonote
size_t n_total_outs = sources[0].outputs.size(); // only for non-simple rct
BOOST_FOREACH(const tx_source_entry& src_entr, sources)
all_rct_inputs &= !(src_entr.mask == rct::identity());
- bool use_simple_rct = true; //all_rct_inputs;
+
+ // the non-simple version is slightly smaller, but assumes all real inputs
+ // are on the same index, so can only be used if there just one ring.
+ bool use_simple_rct = sources.size() > 1;
if (!use_simple_rct)
{