mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Disable pathfinding indexing on validator nodes:
The pathfinding engine requires pre-building large tables which is a
resource-intensive operation. Typically, one would not expect that a
server configured as a validator would also support pathfinding APIs
and so, building those tables by default wastes resources.
This commit, if merged, will disable pathfinding on servers that are
configured as validators, unless the server operator opts to support
it explicitly, by configuring the `[path_search_max]` parameter.
Validator operators that wish to support pathfinding on a validator
and want to use the default values can add the following stanza to
their server's configuration file:
[path_search_max]
7
This commit is contained in:
@@ -615,6 +615,11 @@ Config::loadFromString(std::string const& fileContents)
|
||||
FETCH_DEPTH = 10;
|
||||
}
|
||||
|
||||
// By default, validators don't have pathfinding enabled, unless it is
|
||||
// explicitly requested by the server's admin.
|
||||
if (exists(SECTION_VALIDATION_SEED) || exists(SECTION_VALIDATOR_TOKEN))
|
||||
PATH_SEARCH_MAX = 0;
|
||||
|
||||
if (getSingleSection(secConfig, SECTION_PATH_SEARCH_OLD, strTemp, j_))
|
||||
PATH_SEARCH_OLD = beast::lexicalCastThrow<int>(strTemp);
|
||||
if (getSingleSection(secConfig, SECTION_PATH_SEARCH, strTemp, j_))
|
||||
|
||||
Reference in New Issue
Block a user