aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz/protocol.cpp
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2020-05-10 18:35:55 +0000
committerpracticalswift <practicalswift@users.noreply.github.com>2020-05-14 18:52:57 +0000
commitcd34038cbda4864e4770734c44b18d3e01aa2a28 (patch)
treed08835aeb6ee0f4b11a4c827eb2150957d63dd37 /src/test/fuzz/protocol.cpp
parentfb559c1170773360afb9d05daaccd57d18636ee9 (diff)
Switch from Optional<T> to std::optional<T> (C++17). Run clang-format.
Diffstat (limited to 'src/test/fuzz/protocol.cpp')
-rw-r--r--src/test/fuzz/protocol.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/fuzz/protocol.cpp b/src/test/fuzz/protocol.cpp
index 954471de6c..78df0f89e7 100644
--- a/src/test/fuzz/protocol.cpp
+++ b/src/test/fuzz/protocol.cpp
@@ -2,20 +2,20 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#include <optional.h>
#include <protocol.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
#include <cstdint>
+#include <optional>
#include <stdexcept>
#include <vector>
void test_one_input(const std::vector<uint8_t>& buffer)
{
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
- const Optional<CInv> inv = ConsumeDeserializable<CInv>(fuzzed_data_provider);
+ const std::optional<CInv> inv = ConsumeDeserializable<CInv>(fuzzed_data_provider);
if (!inv) {
return;
}
@@ -24,7 +24,7 @@ void test_one_input(const std::vector<uint8_t>& buffer)
} catch (const std::out_of_range&) {
}
(void)inv->ToString();
- const Optional<CInv> another_inv = ConsumeDeserializable<CInv>(fuzzed_data_provider);
+ const std::optional<CInv> another_inv = ConsumeDeserializable<CInv>(fuzzed_data_provider);
if (!another_inv) {
return;
}