From bb22fd56f8f1e98f41eb2775a782d97fe9af99b2 Mon Sep 17 00:00:00 2001 From: Matus Kysel Date: Wed, 16 Oct 2024 15:28:41 +0200 Subject: [PATCH] removed old file --- libraries/common/include/common/init.hpp | 4 ++-- libraries/common/include/common/static_init.hpp | 15 --------------- programs/taraxad/main.cpp | 2 +- 3 files changed, 3 insertions(+), 18 deletions(-) delete mode 100644 libraries/common/include/common/static_init.hpp diff --git a/libraries/common/include/common/init.hpp b/libraries/common/include/common/init.hpp index edbcc4433d..59fbeb7809 100644 --- a/libraries/common/include/common/init.hpp +++ b/libraries/common/include/common/init.hpp @@ -21,9 +21,9 @@ inline bool checkDiskSpace(const std::string& path, uint64_t required_space_MB) // Get file system statistics if (statvfs(path.c_str(), &stat) != 0) { - // If statvfs fails, return false + // If statvfs fails, return true std::cerr << "Error getting file system stats" << std::endl; - return false; + return true; } // Calculate available space diff --git a/libraries/common/include/common/static_init.hpp b/libraries/common/include/common/static_init.hpp deleted file mode 100644 index f39cf34cce..0000000000 --- a/libraries/common/include/common/static_init.hpp +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once - -#include - -#include "common/util.hpp" - -namespace taraxa { - -inline void static_init() { - if (sodium_init() == -1) { - throw std::runtime_error("libsodium init failure"); - } -} - -} // namespace taraxa diff --git a/programs/taraxad/main.cpp b/programs/taraxad/main.cpp index 807b87b480..17aa61336c 100644 --- a/programs/taraxad/main.cpp +++ b/programs/taraxad/main.cpp @@ -12,7 +12,7 @@ using namespace taraxa; int main(int argc, const char* argv[]) { static_init(); - if (!checkDiskSpace(cli::tools::getTaraxaDefaultConfigFile(), 100)) { + if (!checkDiskSpace(cli::tools::getTaraxaDefaultConfigFile(), 10)) { std::cerr << "Insufficient disk space" << std::endl; return 1; }