mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-10 20:53:50 +01:00
cli: fix Fatal LevelDB error when specifying -blockfilterindex=basic twice
This commit is contained in:
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user