From 59417ccebfbdb7053ffef08ed26625e04f629280 Mon Sep 17 00:00:00 2001 From: EntireTwix Date: Wed, 19 May 2021 14:27:29 -0700 Subject: [PATCH] :bug: Log Size reduction will load correctly now --- config.json | 7 +++++++ include/user.hpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/config.json b/config.json index 331a931..fa95be9 100644 --- a/config.json +++ b/config.json @@ -4,6 +4,13 @@ "address": "0.0.0.0", "port": 80, "https": false + }, + { + "address": "0.0.0.0", + "port": 443, + "https": true, + "cert": "", + "key": "" } ] } diff --git a/include/user.hpp b/include/user.hpp index d51ed01..a1f98f9 100644 --- a/include/user.hpp +++ b/include/user.hpp @@ -37,7 +37,7 @@ struct User { log.data.resize(log_j.size()+pre_log_size); log.end = log_j.size(); - for(uint32_t i = 0; i < log_j.size(); ++i) + for(uint32_t i = 0; i < log_j.size() && i < max_log_size; ++i) { log.data[i] = std::move(Transaction(log_j[i]["from"].asCString(), log_j[i]["to"].asCString(), log_j[i]["balance"].asUInt())); }