We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d53400e commit 4a5be10Copy full SHA for 4a5be10
src/node/blockstorage.cpp
@@ -387,7 +387,12 @@ bool BlockManager::LoadBlockIndex(const std::optional<uint256>& snapshot_blockha
387
}
388
389
if (snapshot_blockhash) {
390
- const AssumeutxoData au_data = *Assert(GetParams().AssumeutxoForBlockhash(*snapshot_blockhash));
+ const std::optional<AssumeutxoData> maybe_au_data = GetParams().AssumeutxoForBlockhash(*snapshot_blockhash);
391
+ if (!maybe_au_data) {
392
+ m_opts.notifications.fatalError(strprintf("Assumeutxo data not found for the given blockhash '%s'.", snapshot_blockhash->ToString()));
393
+ return false;
394
+ }
395
+ const AssumeutxoData& au_data = *Assert(maybe_au_data);
396
m_snapshot_height = au_data.height;
397
CBlockIndex* base{LookupBlockIndex(*snapshot_blockhash)};
398
0 commit comments