diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-12-11 09:07:31 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-12-11 09:07:34 +0100 |
commit | 7d746bdd1829584d7640a9afbacfe9cf76eeb293 (patch) | |
tree | 05f8661ebd404930bf248d65c04e526289207ad3 /src | |
parent | 50c502f54abd9eb15c8ddca013f0fdfae3d132a9 (diff) | |
parent | fa72dd314fe857d827d9b311bdf0453e9463746f (diff) | |
download | bitcoin-7d746bdd1829584d7640a9afbacfe9cf76eeb293.tar.xz |
Merge bitcoin/bitcoin#23733: fuzz: Move ISO8601 to one place
fa72dd314fe857d827d9b311bdf0453e9463746f fuzz: Move ISO8601 to one place (MarcoFalke)
Pull request description:
Seems confusing to split this to two places.
Also fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=42178
ACKs for top commit:
fanquake:
ACK fa72dd314fe857d827d9b311bdf0453e9463746f
Tree-SHA512: 637b0671078848ea417fdf66b92715602040fad34d4ca5f7b843a519a1cfeebe5d992a79a399deba39926905125681d66ab0dc05f66f79a26f3bf555e12fb0ba
Diffstat (limited to 'src')
-rw-r--r-- | src/test/fuzz/integer.cpp | 4 | ||||
-rw-r--r-- | src/test/fuzz/parse_iso8601.cpp | 1 |
2 files changed, 1 insertions, 4 deletions
diff --git a/src/test/fuzz/integer.cpp b/src/test/fuzz/integer.cpp index b6c40809e3..ce424c443e 100644 --- a/src/test/fuzz/integer.cpp +++ b/src/test/fuzz/integer.cpp @@ -29,12 +29,10 @@ #include <util/strencodings.h> #include <util/string.h> #include <util/system.h> -#include <util/time.h> #include <version.h> #include <cassert> #include <chrono> -#include <ctime> #include <limits> #include <set> #include <vector> @@ -81,8 +79,6 @@ FUZZ_TARGET_INIT(integer, initialize_integer) (void)ComputeMerkleRoot(v256); (void)CountBits(u64); (void)DecompressAmount(u64); - (void)FormatISO8601Date(i64); - (void)FormatISO8601DateTime(i64); { if (std::optional<CAmount> parsed = ParseMoney(FormatMoney(i64))) { assert(parsed.value() == i64); diff --git a/src/test/fuzz/parse_iso8601.cpp b/src/test/fuzz/parse_iso8601.cpp index a56f2aa48d..3c56fa49ee 100644 --- a/src/test/fuzz/parse_iso8601.cpp +++ b/src/test/fuzz/parse_iso8601.cpp @@ -19,6 +19,7 @@ FUZZ_TARGET(parse_iso8601) const std::string random_string = fuzzed_data_provider.ConsumeRemainingBytesAsString(); const std::string iso8601_datetime = FormatISO8601DateTime(random_time); + (void)FormatISO8601Date(random_time); const int64_t parsed_time_1 = ParseISO8601DateTime(iso8601_datetime); if (random_time >= 0) { assert(parsed_time_1 >= 0); |