aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2021-03-15 11:59:05 +0800
committerfanquake <fanquake@gmail.com>2021-03-17 14:56:20 +0800
commitebc4ab721b0371c0ef217c0f5bd7d42613e951e6 (patch)
treec4f91deb60589d4d6e5c347d99ca7c611a01ee79 /src/net.cpp
parent57e980d13ca488031bde6ef197cf34d493d36796 (diff)
downloadbitcoin-ebc4ab721b0371c0ef217c0f5bd7d42613e951e6.tar.xz
refactor: post Optional<> removal cleanups
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net.cpp b/src/net.cpp
index fb8e06d14b..6a2469f950 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -18,7 +18,6 @@
#include <net_permissions.h>
#include <netbase.h>
#include <node/ui_interface.h>
-#include <optional>
#include <protocol.h>
#include <random.h>
#include <scheduler.h>
@@ -39,6 +38,7 @@
#include <algorithm>
#include <cstdint>
#include <functional>
+#include <optional>
#include <unordered_map>
#include <math.h>
@@ -752,7 +752,7 @@ std::optional<CNetMessage> V1TransportDeserializer::GetMessage(const std::chrono
LogPrint(BCLog::NET, "HEADER ERROR - COMMAND (%s, %u bytes), peer=%d\n",
hdr.GetCommand(), msg->m_message_size, m_node_id);
out_err_raw_size = msg->m_raw_message_size;
- msg = std::nullopt;
+ msg.reset();
}
// Always reset the network deserializer (prepare for the next message)