Skip to content

Commit c7c9dd2

Browse files
committed
WIP
1 parent a95373a commit c7c9dd2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/init.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ void SetupServerArgs()
402402
strprintf("Maintain an index of compact filters by block (default: %s, values: %s).", DEFAULT_BLOCKFILTERINDEX, ListBlockFilterTypes()) +
403403
" If <type> is not supplied or if <type> = 1, indexes for all known types are enabled.",
404404
ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
405+
gArgs.AddArg("-utxostatsindex", strprintf("Maintain UTXO statistics index, used by the gettxoutset rpc call (default: %u)", DEFAULT_TXINDEX), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
405406

406407
gArgs.AddArg("-addnode=<ip>", "Add a node to connect to and attempt to keep the connection open (see the `addnode` RPC command help for more info). This option can be specified multiple times to add multiple nodes.", ArgsManager::ALLOW_ANY | ArgsManager::NETWORK_ONLY, OptionsCategory::CONNECTION);
407408
gArgs.AddArg("-banscore=<n>", strprintf("Threshold for disconnecting misbehaving peers (default: %u)", DEFAULT_BANSCORE_THRESHOLD), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
@@ -1665,8 +1666,10 @@ bool AppInitMain(NodeContext& node)
16651666
GetBlockFilterIndex(filter_type)->Start();
16661667
}
16671668

1668-
g_utxo_set_hash = MakeUnique<UtxoSetHash>(utsh_cache, false, fReindex);
1669-
g_utxo_set_hash->Start();
1669+
if (gArgs.GetBoolArg("-utxostatsindex", DEFAULT_UTXOSTATSINDEX)) {
1670+
g_utxo_set_hash = MakeUnique<UtxoSetHash>(utsh_cache, false, fReindex);
1671+
g_utxo_set_hash->Start();
1672+
}
16701673

16711674
// ********************************************************* Step 9: load wallet
16721675
for (const auto& client : node.chain_clients) {

src/validation.h

+1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ static const int64_t MAX_FEE_ESTIMATION_TIP_AGE = 3 * 60 * 60;
112112

113113
static const bool DEFAULT_CHECKPOINTS_ENABLED = true;
114114
static const bool DEFAULT_TXINDEX = false;
115+
static const bool DEFAULT_UTXOSTATSINDEX = false;
115116
static const char* const DEFAULT_BLOCKFILTERINDEX = "0";
116117
static const unsigned int DEFAULT_BANSCORE_THRESHOLD = 100;
117118
/** Default for -persistmempool */

0 commit comments

Comments
 (0)