Fix assumeutxo crash due to missing base_blockhash

This commit is contained in:
MarcoFalke 2021-04-03 15:30:04 +02:00
parent fa8fffebe8
commit fa9b74f5ea
No known key found for this signature in database
GPG key ID: CE2B75697E69A548
2 changed files with 14 additions and 25 deletions

View file

@ -259,6 +259,11 @@ BOOST_FIXTURE_TEST_CASE(chainstatemanager_activate_snapshot, TestChain100Determi
// Coins count is smaller than coins in file
metadata.m_coins_count -= 1;
}));
BOOST_REQUIRE(!CreateAndActivateUTXOSnapshot(
m_node, m_path_root, [](CAutoFile& auto_infile, SnapshotMetadata& metadata) {
// Wrong hash
metadata.m_base_blockhash = uint256::ONE;
}));
BOOST_REQUIRE(CreateAndActivateUTXOSnapshot(m_node, m_path_root));