mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
assumeutxo: Check deserialized coins for out of range values
This commit is contained in:
parent
66865446a7
commit
f6213929c5
1 changed files with 5 additions and 0 deletions
|
@ -5399,6 +5399,11 @@ bool ChainstateManager::PopulateAndValidateSnapshot(
|
|||
coins_count - coins_left);
|
||||
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));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue