mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-12 23:07:02 +02:00
assumeutxo: Check deserialized coins for out of range values
This commit is contained in:
@ -5399,6 +5399,11 @@ bool ChainstateManager::PopulateAndValidateSnapshot(
|
|||||||
coins_count - coins_left);
|
coins_count - coins_left);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (!MoneyRange(coin.out.nValue)) {
|
||||||
|
LogPrintf("[snapshot] bad snapshot data after deserializing %d coins - bad tx out value\n",
|
||||||
|
coins_count - coins_left);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
coins_cache.EmplaceCoinInternalDANGER(std::move(outpoint), std::move(coin));
|
coins_cache.EmplaceCoinInternalDANGER(std::move(outpoint), std::move(coin));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user