From 008ba966da88f073f226b299533faca905ceabf8 Mon Sep 17 00:00:00 2001 From: jeffro256 Date: Wed, 17 Jan 2024 17:17:16 -0600 Subject: blockchain sync: reduce disk writes from 2 to 1 per tx --- src/daemon/command_parser_executor.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/daemon/command_parser_executor.cpp') diff --git a/src/daemon/command_parser_executor.cpp b/src/daemon/command_parser_executor.cpp index 087a4e48b..0c091c7ed 100644 --- a/src/daemon/command_parser_executor.cpp +++ b/src/daemon/command_parser_executor.cpp @@ -1063,7 +1063,7 @@ bool t_command_parser_executor::set_bootstrap_daemon(const std::vector& args) { - bool bad_txs = false, bad_blocks = false; + bool bad_blocks = false; std::string arg; if (args.empty()) @@ -1072,18 +1072,16 @@ bool t_command_parser_executor::flush_cache(const std::vector& args for (size_t i = 0; i < args.size(); ++i) { arg = args[i]; - if (arg == "bad-txs") - bad_txs = true; - else if (arg == "bad-blocks") + if (arg == "bad-blocks") bad_blocks = true; else goto show_list; } - return m_executor.flush_cache(bad_txs, bad_blocks); + return m_executor.flush_cache(bad_blocks); show_list: std::cout << "Invalid cache type: " << arg << std::endl; - std::cout << "Cache types: bad-txs bad-blocks" << std::endl; + std::cout << "Cache types: bad-blocks" << std::endl; return true; } -- cgit v1.2.3