Merge feae4e0438 into merged_master (Bitcoin PR bitcoin/bitcoin#28698)

This commit is contained in:
Byron Hambly 2025-11-05 16:01:01 +02:00
commit 7ca8a8b973
No known key found for this signature in database
GPG key ID: DE8F6EA20A661697
2 changed files with 25 additions and 1 deletions

View file

@ -477,7 +477,12 @@ bool BlockManager::LoadBlockIndex(ChainstateManager& chainman, const std::option
}
if (snapshot_blockhash) {
const AssumeutxoData au_data = *Assert(GetParams().AssumeutxoForBlockhash(*snapshot_blockhash));
const std::optional<AssumeutxoData> maybe_au_data = GetParams().AssumeutxoForBlockhash(*snapshot_blockhash);
if (!maybe_au_data) {
m_opts.notifications.fatalError(strprintf("Assumeutxo data not found for the given blockhash '%s'.", snapshot_blockhash->ToString()));
return false;
}
const AssumeutxoData& au_data = *Assert(maybe_au_data);
m_snapshot_height = au_data.height;
CBlockIndex* base{LookupBlockIndex(*snapshot_blockhash)};