diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2020-05-10 18:35:55 +0000 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2020-05-14 18:52:57 +0000 |
commit | cd34038cbda4864e4770734c44b18d3e01aa2a28 (patch) | |
tree | d08835aeb6ee0f4b11a4c827eb2150957d63dd37 /src/test/fuzz/pow.cpp | |
parent | fb559c1170773360afb9d05daaccd57d18636ee9 (diff) |
Switch from Optional<T> to std::optional<T> (C++17). Run clang-format.
Diffstat (limited to 'src/test/fuzz/pow.cpp')
-rw-r--r-- | src/test/fuzz/pow.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/fuzz/pow.cpp b/src/test/fuzz/pow.cpp index 0343d33401..b7fc72373d 100644 --- a/src/test/fuzz/pow.cpp +++ b/src/test/fuzz/pow.cpp @@ -4,7 +4,6 @@ #include <chain.h> #include <chainparams.h> -#include <optional.h> #include <pow.h> #include <primitives/block.h> #include <test/fuzz/FuzzedDataProvider.h> @@ -12,6 +11,7 @@ #include <test/fuzz/util.h> #include <cstdint> +#include <optional> #include <string> #include <vector> @@ -28,7 +28,7 @@ void test_one_input(const std::vector<uint8_t>& buffer) const uint32_t fixed_time = fuzzed_data_provider.ConsumeIntegral<uint32_t>(); const uint32_t fixed_bits = fuzzed_data_provider.ConsumeIntegral<uint32_t>(); while (fuzzed_data_provider.remaining_bytes() > 0) { - const Optional<CBlockHeader> block_header = ConsumeDeserializable<CBlockHeader>(fuzzed_data_provider); + const std::optional<CBlockHeader> block_header = ConsumeDeserializable<CBlockHeader>(fuzzed_data_provider); if (!block_header) { continue; } @@ -72,7 +72,7 @@ void test_one_input(const std::vector<uint8_t>& buffer) } } { - const Optional<uint256> hash = ConsumeDeserializable<uint256>(fuzzed_data_provider); + const std::optional<uint256> hash = ConsumeDeserializable<uint256>(fuzzed_data_provider); if (hash) { (void)CheckProofOfWork(*hash, fuzzed_data_provider.ConsumeIntegral<unsigned int>(), consensus_params); } |