mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
Merge 9321df4487 into merged_master (Bitcoin PR bitcoin/bitcoin#25862)
This commit is contained in:
commit
9d216df88a
21 changed files with 193 additions and 73 deletions
|
|
@ -1611,13 +1611,9 @@ CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams)
|
|||
return nSubsidy;
|
||||
}
|
||||
|
||||
CoinsViews::CoinsViews(
|
||||
fs::path ldb_name,
|
||||
size_t cache_size_bytes,
|
||||
bool in_memory,
|
||||
bool should_wipe) : m_dbview(
|
||||
gArgs.GetDataDirNet() / ldb_name, cache_size_bytes, in_memory, should_wipe),
|
||||
m_catcherview(&m_dbview) {}
|
||||
CoinsViews::CoinsViews(DBParams db_params, CoinsViewOptions options)
|
||||
: m_dbview{std::move(db_params), std::move(options)},
|
||||
m_catcherview(&m_dbview) {}
|
||||
|
||||
void CoinsViews::InitCache()
|
||||
{
|
||||
|
|
@ -1646,7 +1642,14 @@ void Chainstate::InitCoinsDB(
|
|||
}
|
||||
|
||||
m_coins_views = std::make_unique<CoinsViews>(
|
||||
leveldb_name, cache_size_bytes, in_memory, should_wipe);
|
||||
DBParams{
|
||||
.path = m_chainman.m_options.datadir / leveldb_name,
|
||||
.cache_bytes = cache_size_bytes,
|
||||
.memory_only = in_memory,
|
||||
.wipe_data = should_wipe,
|
||||
.obfuscate = true,
|
||||
.options = m_chainman.m_options.coins_db},
|
||||
m_chainman.m_options.coins_view);
|
||||
}
|
||||
|
||||
void Chainstate::InitCoinsCache(size_t cache_size_bytes)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue