mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
Merge 141540a71f into merged_master (Bitcoin PR bitcoin/bitcoin#25222)
This commit is contained in:
commit
d7ccdef889
4 changed files with 18 additions and 13 deletions
|
|
@ -961,9 +961,9 @@ static std::optional<kernel::CCoinsStats> GetUTXOStats(CCoinsView* view, node::B
|
|||
// Use CoinStatsIndex if it is requested and available and a hash_type of Muhash or None was requested
|
||||
if ((hash_type == kernel::CoinStatsHashType::MUHASH || hash_type == kernel::CoinStatsHashType::NONE) && g_coin_stats_index && index_requested) {
|
||||
if (pindex) {
|
||||
return g_coin_stats_index->LookUpStats(pindex);
|
||||
return g_coin_stats_index->LookUpStats(*pindex);
|
||||
} else {
|
||||
CBlockIndex* block_index = WITH_LOCK(::cs_main, return blockman.LookupBlockIndex(view->GetBestBlock()));
|
||||
CBlockIndex& block_index = *CHECK_NONFATAL(WITH_LOCK(::cs_main, return blockman.LookupBlockIndex(view->GetBestBlock())));
|
||||
return g_coin_stats_index->LookUpStats(block_index);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue