From abb4728cf792c03130c6b7e3125d336477736b49 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 27 Oct 2018 14:34:15 +0000 Subject: [PATCH] wallet2: fix ring reuse breaking when using histogram --- src/wallet/wallet2.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index b02c95457..c25f17a1f 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -7143,6 +7143,9 @@ void wallet2::get_outs(std::vector> break; } } + bool use_histogram = amount != 0 || !has_rct_distribution; + if (!use_histogram) + num_outs = rct_offsets[rct_offsets.size() - CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE]; // make sure the real outputs we asked for are really included, along // with the correct key and mask: this guards against an active attack