diff options
Diffstat (limited to 'src/blockchain_utilities/blockchain_usage.cpp')
-rw-r--r-- | src/blockchain_utilities/blockchain_usage.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/blockchain_utilities/blockchain_usage.cpp b/src/blockchain_utilities/blockchain_usage.cpp index b78f3591b..38a0b2648 100644 --- a/src/blockchain_utilities/blockchain_usage.cpp +++ b/src/blockchain_utilities/blockchain_usage.cpp @@ -243,10 +243,17 @@ int main(int argc, char* argv[]) counts[out.second.size()]++; total++; } - for (const auto &c: counts) + if (total > 0) { - float percent = 100.f * c.second / total; - MINFO(std::to_string(c.second) << " outputs used " << c.first << " times (" << percent << "%)"); + 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"); |