diff --git a/src/log.cpp b/src/log.cpp index 6915540..c0fed03 100644 --- a/src/log.cpp +++ b/src/log.cpp @@ -21,7 +21,7 @@ void Log::AddTrans(const Transaction &t) noexcept const std::string &Log::GetLogs() noexcept { - if (log_flag.GetChangeState()) //if there are changes + if (log_flag.GetChangeState() && data.size()) //if there are changes { //re-generate snapshot //({\"amount\":1,\"from\":\"\",\"time\":1625943626,\"to\":\"\"}, + (2*max_name_size)+10+10) * # of logs) + 1