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/blockfilter.cpp | |
parent | cb11324a63ef10475bfc4d8e45148d5ae6f3e71e (diff) | |
download | bitcoin-034561f9cd4180ea1c165cb02df6c84444a8d692.tar.xz |
cli: fix Fatal LevelDB error when specifying -blockfilterindex=basic twice
Diffstat (limited to 'src/blockfilter.cpp')
-rw-r--r-- | src/blockfilter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/blockfilter.cpp b/src/blockfilter.cpp index 787390be31..5ad22d46eb 100644 --- a/src/blockfilter.cpp +++ b/src/blockfilter.cpp @@ -4,6 +4,7 @@ #include <mutex> #include <sstream> +#include <set> #include <blockfilter.h> #include <crypto/siphash.h> @@ -221,15 +222,14 @@ bool BlockFilterTypeByName(const std::string& name, BlockFilterType& filter_type return false; } -const std::vector<BlockFilterType>& AllBlockFilterTypes() +const std::set<BlockFilterType>& AllBlockFilterTypes() { - static std::vector<BlockFilterType> types; + static std::set<BlockFilterType> types; static std::once_flag flag; std::call_once(flag, []() { - types.reserve(g_filter_types.size()); for (auto entry : g_filter_types) { - types.push_back(entry.first); + types.insert(entry.first); } }); |