mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-02 09:15:04 +02:00
test: Avoid testing negative block heights
This commit is contained in:
@@ -211,7 +211,7 @@ FUZZ_TARGET_INIT(coins_view, initialize_coins_view)
|
||||
return;
|
||||
}
|
||||
bool expected_code_path = false;
|
||||
const int height = fuzzed_data_provider.ConsumeIntegral<int>();
|
||||
const int height{int(fuzzed_data_provider.ConsumeIntegral<uint32_t>() >> 1)};
|
||||
const bool possible_overwrite = fuzzed_data_provider.ConsumeBool();
|
||||
try {
|
||||
AddCoins(coins_view_cache, transaction, height, possible_overwrite);
|
||||
|
||||
Reference in New Issue
Block a user