diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-12-13 10:09:42 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-12-13 10:09:42 +0000 |
commit | f5bc7f18552c5b90c9f08e0f190e465f43388c12 (patch) | |
tree | a0e9ba037dd6f46c930f90de049b9d499308b58f | |
parent | Merge pull request #2906 (diff) | |
download | monero-f5bc7f18552c5b90c9f08e0f190e465f43388c12.tar.xz |
simplewallet: fix default unspent_outputs output with subaddresses
If no subaddress index is given, consider all of them
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<std::string> &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; |