mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-12 10:30:08 +01:00
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.
31 lines
820 B
C++
31 lines
820 B
C++
// Copyright (c) 2022 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#ifndef BITCOIN_KERNEL_BLOCKMANAGER_OPTS_H
|
|
#define BITCOIN_KERNEL_BLOCKMANAGER_OPTS_H
|
|
|
|
#include <kernel/notifications_interface.h>
|
|
#include <util/fs.h>
|
|
|
|
#include <cstdint>
|
|
|
|
class CChainParams;
|
|
|
|
namespace kernel {
|
|
|
|
/**
|
|
* An options struct for `BlockManager`, more ergonomically referred to as
|
|
* `BlockManager::Options` due to the using-declaration in `BlockManager`.
|
|
*/
|
|
struct BlockManagerOpts {
|
|
const CChainParams& chainparams;
|
|
uint64_t prune_target{0};
|
|
bool fast_prune{false};
|
|
const fs::path blocks_dir;
|
|
Notifications& notifications;
|
|
};
|
|
|
|
} // namespace kernel
|
|
|
|
#endif // BITCOIN_KERNEL_BLOCKMANAGER_OPTS_H
|