mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 11:57:28 -03:00
fuzz: Limit fuzzed time to years 2000-2100
This commit is contained in:
parent
3d0850cec1
commit
fa7238300c
2 changed files with 2 additions and 3 deletions
|
@ -281,8 +281,8 @@ CAmount ConsumeMoney(FuzzedDataProvider& fuzzed_data_provider, const std::option
|
|||
int64_t ConsumeTime(FuzzedDataProvider& fuzzed_data_provider, const std::optional<int64_t>& min, const std::optional<int64_t>& max) noexcept
|
||||
{
|
||||
// Avoid t=0 (1970-01-01T00:00:00Z) since SetMockTime(0) disables mocktime.
|
||||
static const int64_t time_min = ParseISO8601DateTime("1970-01-01T00:00:01Z");
|
||||
static const int64_t time_max = ParseISO8601DateTime("9999-12-31T23:59:59Z");
|
||||
static const int64_t time_min{ParseISO8601DateTime("2000-01-01T00:00:01Z")};
|
||||
static const int64_t time_max{ParseISO8601DateTime("2100-12-31T23:59:59Z")};
|
||||
return fuzzed_data_provider.ConsumeIntegralInRange<int64_t>(min.value_or(time_min), max.value_or(time_max));
|
||||
}
|
||||
|
||||
|
|
|
@ -96,7 +96,6 @@ implicit-signed-integer-truncation:chain.h
|
|||
implicit-signed-integer-truncation:crypto/
|
||||
implicit-signed-integer-truncation:node/miner.cpp
|
||||
implicit-signed-integer-truncation:net.cpp
|
||||
implicit-signed-integer-truncation:net_processing.cpp
|
||||
implicit-signed-integer-truncation:streams.h
|
||||
implicit-signed-integer-truncation:test/arith_uint256_tests.cpp
|
||||
implicit-signed-integer-truncation:test/skiplist_tests.cpp
|
||||
|
|
Loading…
Reference in a new issue