refactor: Use type-safe assumeutxo hash

This avoids accidentally mixing it up with other hashes (like block
hashes).
This commit is contained in:
MarcoFalke
2021-04-04 14:20:13 +02:00
parent 0000007709
commit fa5668bfb3
4 changed files with 11 additions and 6 deletions

View File

@@ -4939,7 +4939,7 @@ bool ChainstateManager::PopulateAndValidateSnapshot(
const AssumeutxoData& au_data = *maybe_au_data;
if (stats.hashSerialized != au_data.hash_serialized) {
if (AssumeutxoHash{stats.hashSerialized} != au_data.hash_serialized) {
LogPrintf("[snapshot] bad snapshot content hash: expected %s, got %s\n",
au_data.hash_serialized.ToString(), stats.hashSerialized.ToString());
return false;