mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-23 07:52:25 +00:00
Merge pull request #3543
6fc97c9
blockchain_usage: don't divide by 0 when there is nothing to process (moneromooo-monero)
This commit is contained in:
commit
c8378933ae
1 changed files with 10 additions and 3 deletions
|
@ -243,11 +243,18 @@ int main(int argc, char* argv[])
|
|||
counts[out.second.size()]++;
|
||||
total++;
|
||||
}
|
||||
if (total > 0)
|
||||
{
|
||||
for (const auto &c: counts)
|
||||
{
|
||||
float percent = 100.f * c.second / total;
|
||||
MINFO(std::to_string(c.second) << " outputs used " << c.first << " times (" << percent << "%)");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MINFO("No outputs to process");
|
||||
}
|
||||
|
||||
LOG_PRINT_L0("Blockchain usage exported OK");
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue