diff options
author | Harris <brakmic@gmail.com> | 2019-12-06 21:47:55 +0100 |
---|---|---|
committer | Harris <brakmic@gmail.com> | 2019-12-06 21:47:55 +0100 |
commit | 034561f9cd4180ea1c165cb02df6c84444a8d692 (patch) | |
tree | 1c0f2961ac02458cbf6c894d6603b94bdcb064f8 /src/init.cpp | |
parent | cb11324a63ef10475bfc4d8e45148d5ae6f3e71e (diff) |
cli: fix Fatal LevelDB error when specifying -blockfilterindex=basic twice
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/init.cpp b/src/init.cpp index e7dda59590..9c91c93e65 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -58,6 +58,7 @@ #include <stdint.h> #include <stdio.h> +#include <set> #ifndef WIN32 #include <attributes.h> @@ -846,7 +847,7 @@ int nUserMaxConnections; int nFD; ServiceFlags nLocalServices = ServiceFlags(NODE_NETWORK | NODE_NETWORK_LIMITED); int64_t peer_connect_timeout; -std::vector<BlockFilterType> g_enabled_filter_types; +std::set<BlockFilterType> g_enabled_filter_types; } // namespace @@ -934,13 +935,12 @@ bool AppInitParameterInteraction() g_enabled_filter_types = AllBlockFilterTypes(); } else if (blockfilterindex_value != "0") { const std::vector<std::string> names = gArgs.GetArgs("-blockfilterindex"); - g_enabled_filter_types.reserve(names.size()); for (const auto& name : names) { BlockFilterType filter_type; if (!BlockFilterTypeByName(name, filter_type)) { return InitError(strprintf(_("Unknown -blockfilterindex value %s.").translated, name)); } - g_enabled_filter_types.push_back(filter_type); + g_enabled_filter_types.insert(filter_type); } } |