mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-30 07:43:48 +02:00
refactor: use std::string for index names
This commit is contained in:
@@ -97,7 +97,8 @@ static std::map<BlockFilterType, BlockFilterIndex> g_filter_indexes;
|
||||
|
||||
BlockFilterIndex::BlockFilterIndex(std::unique_ptr<interfaces::Chain> chain, BlockFilterType filter_type,
|
||||
size_t n_cache_size, bool f_memory, bool f_wipe)
|
||||
: BaseIndex(std::move(chain)), m_filter_type(filter_type)
|
||||
: BaseIndex(std::move(chain), BlockFilterTypeName(filter_type) + " block filter index")
|
||||
, m_filter_type(filter_type)
|
||||
{
|
||||
const std::string& filter_name = BlockFilterTypeName(filter_type);
|
||||
if (filter_name.empty()) throw std::invalid_argument("unknown filter_type");
|
||||
@@ -105,7 +106,6 @@ BlockFilterIndex::BlockFilterIndex(std::unique_ptr<interfaces::Chain> chain, Blo
|
||||
fs::path path = gArgs.GetDataDirNet() / "indexes" / "blockfilter" / fs::u8path(filter_name);
|
||||
fs::create_directories(path);
|
||||
|
||||
m_name = filter_name + " block filter index";
|
||||
m_db = std::make_unique<BaseIndex::DB>(path / "db", n_cache_size, f_memory, f_wipe);
|
||||
m_filter_fileseq = std::make_unique<FlatFileSeq>(std::move(path), "fltr", FLTR_FILE_CHUNK_SIZE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user