Merge 0cac45755e into merged_master (Bitcoin PR bitcoin/bitcoin#30320)

This commit is contained in:
ivanlele 2026-03-09 15:15:22 +00:00
commit 4e1c979f2e
No known key found for this signature in database
2 changed files with 33 additions and 3 deletions

View file

@ -6276,6 +6276,10 @@ util::Result<void> ChainstateManager::ActivateSnapshot(
return util::Error{strprintf(Untranslated("The base block header (%s) is part of an invalid chain"), base_blockhash.ToString())};
}
if (!m_best_header || m_best_header->GetAncestor(base_blockheight) != snapshot_start_block) {
return util::Error{_("A forked headers-chain with more work than the chain with the snapshot base block header exists. Please proceed to sync without AssumeUtxo.")};
}
auto mempool{m_active_chainstate->GetMempool()};
if (mempool && mempool->size() > 0) {
return util::Error{Untranslated("Can't activate a snapshot when mempool not empty")};