mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-27 17:49:37 +01:00
assumeutxo: Check snapshot base block is not marked invalid
Co-authored-by: Alfonso Roman Zubeldia <alfonsoromanz24@gmail.com>
This commit is contained in:
@@ -5677,6 +5677,11 @@ util::Result<void> ChainstateManager::ActivateSnapshot(
|
||||
base_blockhash.ToString())};
|
||||
}
|
||||
|
||||
bool start_block_invalid = snapshot_start_block->nStatus & BLOCK_FAILED_MASK;
|
||||
if (start_block_invalid) {
|
||||
return util::Error{strprintf(_("The base block header (%s) is part of an invalid chain."), base_blockhash.ToString())};
|
||||
}
|
||||
|
||||
if (Assert(m_active_chainstate->GetMempool())->size() > 0) {
|
||||
return util::Error{_("Can't activate a snapshot when mempool not empty.")};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user