aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/command_parser_executor.cpp
diff options
context:
space:
mode:
authorjeffro256 <jeffro256@tutanota.com>2024-01-17 17:17:16 -0600
committerjeffro256 <jeffro256@tutanota.com>2025-03-10 01:32:08 -0500
commit008ba966da88f073f226b299533faca905ceabf8 (patch)
tree1be6c2f8d45b74ad0427e0117c67371c93974f7e /src/daemon/command_parser_executor.cpp
parentd0118f4778db7e75d7ad2036076e5688cd6f3810 (diff)
downloadmonzero-core-008ba966da88f073f226b299533faca905ceabf8.tar.gz
monzero-core-008ba966da88f073f226b299533faca905ceabf8.tar.xz
monzero-core-008ba966da88f073f226b299533faca905ceabf8.zip
blockchain sync: reduce disk writes from 2 to 1 per tx
Diffstat (limited to 'src/daemon/command_parser_executor.cpp')
-rw-r--r--src/daemon/command_parser_executor.cpp10
1 files changed, 4 insertions, 6 deletions
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<std::stri
bool t_command_parser_executor::flush_cache(const std::vector<std::string>& 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<std::string>& 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;
}