diff options
author | Crypto City <cryptocity@example.com> | 2023-06-10 06:39:37 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2023-06-10 06:41:17 +0000 |
commit | c138a28f511edf5221344aca0b284d3f7712bfdd (patch) | |
tree | 23a4ea2cec1b51be52d907f7e20b617dee0fe20f /src | |
parent | Merge pull request #8842 (diff) | |
download | monero-c138a28f511edf5221344aca0b284d3f7712bfdd.tar.xz |
wallet2: take ignored-by-value outputs into account in balance
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/wallet2.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 378fccfab..b69bcd3df 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -6091,6 +6091,8 @@ std::map<uint32_t, uint64_t> wallet2::balance_per_subaddress(uint32_t index_majo std::map<uint32_t, uint64_t> amount_per_subaddr; for (const auto& td: m_transfers) { + if (td.amount() > m_ignore_outputs_above || td.amount() < m_ignore_outputs_below) + continue; if (td.m_subaddr_index.major == index_major && !is_spent(td, strict) && !td.m_frozen) { auto found = amount_per_subaddr.find(td.m_subaddr_index.minor); @@ -6146,6 +6148,8 @@ std::map<uint32_t, std::pair<uint64_t, std::pair<uint64_t, uint64_t>>> wallet2:: const uint64_t now = time(NULL); for(const transfer_details& td: m_transfers) { + if (td.amount() > m_ignore_outputs_above || td.amount() < m_ignore_outputs_below) + continue; if(td.m_subaddr_index.major == index_major && !is_spent(td, strict) && !td.m_frozen) { uint64_t amount = 0, blocks_to_unlock = 0, time_to_unlock = 0; |