From f5bc7f18552c5b90c9f08e0f190e465f43388c12 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Wed, 13 Dec 2017 10:09:42 +0000 Subject: [PATCH] simplewallet: fix default unspent_outputs output with subaddresses If no subaddress index is given, consider all of them --- src/simplewallet/simplewallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index a307f9d3d..b201b48f6 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -4726,7 +4726,7 @@ bool simple_wallet::unspent_outputs(const std::vector &args_) for (const auto& td : transfers) { uint64_t amount = td.amount(); - if (td.m_spent || amount < min_amount || amount > max_amount || td.m_subaddr_index.major != m_current_subaddress_account || subaddr_indices.count(td.m_subaddr_index.minor) == 0) + if (td.m_spent || amount < min_amount || amount > max_amount || td.m_subaddr_index.major != m_current_subaddress_account || (subaddr_indices.count(td.m_subaddr_index.minor) == 0 && !subaddr_indices.empty())) continue; amount_to_tds[amount].push_back(td); if (min_height > td.m_block_height) min_height = td.m_block_height;