Bitcoin ABC
0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
src
node
database_args.cpp
Go to the documentation of this file.
1
// Copyright (c) 2022 The Bitcoin Core developers
2
// Distributed under the MIT software license, see the accompanying
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5
#include <
node/database_args.h
>
6
7
#include <
common/args.h
>
8
#include <
dbwrapper.h
>
9
10
namespace
node
{
11
void
ReadDatabaseArgs
(
const
ArgsManager
&args,
DBOptions
&options) {
12
// Settings here apply to all databases (chainstate, blocks, and index
13
// databases), but it'd be easy to parse database-specific options by adding
14
// a database_type string or enum parameter to this function.
15
if
(
auto
value = args.
GetBoolArg
(
"-forcecompactdb"
)) {
16
options.
force_compact
= *value;
17
}
18
}
19
}
// namespace node
args.h
ArgsManager
Definition
args.h:96
ArgsManager::GetBoolArg
bool GetBoolArg(const std::string &strArg, bool fDefault) const
Return boolean argument or default value.
Definition
args.cpp:556
database_args.h
dbwrapper.h
node
Definition
init.h:28
node::ReadDatabaseArgs
void ReadDatabaseArgs(const ArgsManager &args, DBOptions &options)
Definition
database_args.cpp:11
DBOptions
User-controlled performance and debug options.
Definition
dbwrapper.h:26
DBOptions::force_compact
bool force_compact
Compact database on startup.
Definition
dbwrapper.h:28
Generated on Mon Oct 14 2024 02:39:28 for Bitcoin ABC by
1.9.8