🐛 Max log 1 optimizations fixed

This commit is contained in:
EntireTwix 2021-07-06 02:12:38 -07:00
parent 99f35a11df
commit 46fcb1f443

View file

@ -25,10 +25,17 @@ size_t Bank::NumOfUsers() const noexcept { return users.size(); }
uint64_t Bank::NumOfLogs() const noexcept
{
uint64_t res = 0;
#if MAX_LOG_SIZE > 1
#if MAX_LOG_SIZE > 0
for (const auto &u : users)
{
#if MAX_LOG_SIZE == 1
if (u.second.log.data.amount)
{
++res;
}
#else
res += u.second.log.data.size();
#endif
}
#endif
return res;