MCPcopy Create free account
hub / github.com/ElementsProject/elements / ConsumeTime

Function ConsumeTime

src/test/fuzz/util.cpp:281–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

279}
280
281int64_t ConsumeTime(FuzzedDataProvider& fuzzed_data_provider, const std::optional<int64_t>& min, const std::optional<int64_t>& max) noexcept
282{
283 // Avoid t=0 (1970-01-01T00:00:00Z) since SetMockTime(0) disables mocktime.
284 static const int64_t time_min{ParseISO8601DateTime("2000-01-01T00:00:01Z")};
285 static const int64_t time_max{ParseISO8601DateTime("2100-12-31T23:59:59Z")};
286 return fuzzed_data_provider.ConsumeIntegralInRange<int64_t>(min.value_or(time_min), max.value_or(time_max));
287}
288
289CMutableTransaction ConsumeTransaction(FuzzedDataProvider& fuzzed_data_provider, const std::optional<std::vector<uint256>>& prevout_txids, const int max_num_in, const int max_num_out) noexcept
290{

Callers 10

FUZZ_TARGET_INITFunction · 0.85
fuzz_targetFunction · 0.85
FUZZ_TARGET_INITFunction · 0.85
FUZZ_TARGET_INITFunction · 0.85
MockTimeFunction · 0.85
FUZZ_TARGET_INITFunction · 0.85
FUZZ_TARGET_INITFunction · 0.85
FUZZ_TARGET_INITFunction · 0.85
FUZZ_TARGET_INITFunction · 0.85
FUZZ_TARGET_INITFunction · 0.85

Calls 1

ParseISO8601DateTimeFunction · 0.85

Tested by

no test coverage detected