Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
fjahr committed Nov 15, 2019
1 parent a95373a commit c7c9dd2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ void SetupServerArgs()
strprintf("Maintain an index of compact filters by block (default: %s, values: %s).", DEFAULT_BLOCKFILTERINDEX, ListBlockFilterTypes()) +
" If <type> is not supplied or if <type> = 1, indexes for all known types are enabled.",
ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
gArgs.AddArg("-utxostatsindex", strprintf("Maintain UTXO statistics index, used by the gettxoutset rpc call (default: %u)", DEFAULT_TXINDEX), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);

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);
gArgs.AddArg("-banscore=<n>", strprintf("Threshold for disconnecting misbehaving peers (default: %u)", DEFAULT_BANSCORE_THRESHOLD), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
Expand Down Expand Up @@ -1665,8 +1666,10 @@ bool AppInitMain(NodeContext& node)
GetBlockFilterIndex(filter_type)->Start();
}

g_utxo_set_hash = MakeUnique<UtxoSetHash>(utsh_cache, false, fReindex);
g_utxo_set_hash->Start();
if (gArgs.GetBoolArg("-utxostatsindex", DEFAULT_UTXOSTATSINDEX)) {
g_utxo_set_hash = MakeUnique<UtxoSetHash>(utsh_cache, false, fReindex);
g_utxo_set_hash->Start();
}

// ********************************************************* Step 9: load wallet
for (const auto& client : node.chain_clients) {
Expand Down
1 change: 1 addition & 0 deletions src/validation.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ static const int64_t MAX_FEE_ESTIMATION_TIP_AGE = 3 * 60 * 60;

static const bool DEFAULT_CHECKPOINTS_ENABLED = true;
static const bool DEFAULT_TXINDEX = false;
static const bool DEFAULT_UTXOSTATSINDEX = false;
static const char* const DEFAULT_BLOCKFILTERINDEX = "0";
static const unsigned int DEFAULT_BANSCORE_THRESHOLD = 100;
/** Default for -persistmempool */
Expand Down

0 comments on commit c7c9dd2

Please sign in to comment.