aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2024-07-16 18:31:59 -0400
committerluigi1111 <luigi1111w@gmail.com>2024-07-16 18:31:59 -0400
commitf145cb37a4140423d4aedd3edbd2199384701af6 (patch)
tree74639b635d8c22707aca6ef61abc4de165e9ee76
parentMerge pull request #9215 (diff)
parentadd sum of amounts for unspent_outputs (diff)
downloadmonero-f145cb37a4140423d4aedd3edbd2199384701af6.tar.xz
Merge pull request #9278
18fbe54 add sum of amounts for unspent_outputs (SNeedlewoods)
-rw-r--r--src/simplewallet/simplewallet.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index b09ebab5a..4f76834e3 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -8889,6 +8889,7 @@ bool simple_wallet::unspent_outputs(const std::vector<std::string> &args_)
uint64_t max_height = 0;
uint64_t found_min_amount = std::numeric_limits<uint64_t>::max();
uint64_t found_max_amount = 0;
+ uint64_t found_sum_amount = 0;
uint64_t count = 0;
for (const auto& td : transfers)
{
@@ -8900,6 +8901,7 @@ bool simple_wallet::unspent_outputs(const std::vector<std::string> &args_)
if (max_height < td.m_block_height) max_height = td.m_block_height;
if (found_min_amount > amount) found_min_amount = amount;
if (found_max_amount < amount) found_max_amount = amount;
+ found_sum_amount += amount;
++count;
}
if (amount_to_tds.empty())
@@ -8924,6 +8926,7 @@ bool simple_wallet::unspent_outputs(const std::vector<std::string> &args_)
<< tr("\nMax block height: ") << max_height
<< tr("\nMin amount found: ") << print_money(found_min_amount)
<< tr("\nMax amount found: ") << print_money(found_max_amount)
+ << tr("\nSum amount found: ") << print_money(found_sum_amount)
<< tr("\nTotal count: ") << count;
const size_t histogram_height = 10;
const size_t histogram_width = 50;