aboutsummaryrefslogtreecommitdiff
path: root/src/test/util
diff options
context:
space:
mode:
authorRyan Ofsky <ryan@ofsky.org>2024-06-07 12:12:34 +0200
committerTheCharlatan <seb.kung@gmail.com>2024-06-07 19:17:11 +0200
commit804f09dfa116300914e2aeef05ed9710dd504e8c (patch)
tree9dccb9bfec7e6a08dd6036e29b60b958bec67db6 /src/test/util
parente17255322378076edce3ef6f06cd36ca58d2e236 (diff)
kernel: Add less confusing reindex options
Drop confusing kernel options: BlockManagerOpts::reindex ChainstateLoadOptions::reindex ChainstateLoadOptions::reindex_chainstate Replacing them with more straightforward options: ChainstateLoadOptions::wipe_block_tree_db ChainstateLoadOptions::wipe_chainstate_db Having two options called "reindex" which did slightly different things was needlessly confusing (one option wiped the block tree database, and the other caused block files to be rescanned). Also the previous set of options did not allow rebuilding the block database without also rebuilding the chainstate database, when it should be possible to do those independently.
Diffstat (limited to 'src/test/util')
-rw-r--r--src/test/util/setup_common.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/util/setup_common.cpp b/src/test/util/setup_common.cpp
index fd07931716..b366e83dde 100644
--- a/src/test/util/setup_common.cpp
+++ b/src/test/util/setup_common.cpp
@@ -276,8 +276,8 @@ void ChainTestingSetup::LoadVerifyActivateChainstate()
options.mempool = Assert(m_node.mempool.get());
options.block_tree_db_in_memory = m_block_tree_db_in_memory;
options.coins_db_in_memory = m_coins_db_in_memory;
- options.reindex = chainman.m_blockman.m_reindexing;
- options.reindex_chainstate = m_args.GetBoolArg("-reindex-chainstate", false);
+ options.wipe_block_tree_db = m_args.GetBoolArg("-reindex", false);
+ options.wipe_chainstate_db = m_args.GetBoolArg("-reindex", false) || m_args.GetBoolArg("-reindex-chainstate", false);
options.prune = chainman.m_blockman.IsPruneMode();
options.check_blocks = m_args.GetIntArg("-checkblocks", DEFAULT_CHECKBLOCKS);
options.check_level = m_args.GetIntArg("-checklevel", DEFAULT_CHECKLEVEL);