aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorTheCharlatan <seb.kung@gmail.com>2023-09-06 15:55:14 +0200
committerTheCharlatan <seb.kung@gmail.com>2023-09-12 22:51:38 +0200
commit534b314a7401d44f51aabd4565f97be9ee411740 (patch)
tree7109128d57dc16dcc99c1c0a5d4ae2553c5ae55a /src/net.cpp
parent9be330b654cfbd792620295f3867f592059d6a7a (diff)
kernel: Move MessageStartChars to its own file
The protocol.h file contains many non-consensus related definitions and should thus not be part of the libbitcoinkernel. This commit makes protocol.h no longer a required include for users of the libbitcoinkernel. This commit is part of the libbitcoinkernel project, namely its stage 1 step 3: Decouple most non-consensus headers from libbitcoinkernel. Co-Authored-By: Cory Fields <cory-nospam-@coryfields.com>
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp
index d091db74c4..ddbf9a6e3c 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1144,7 +1144,7 @@ bool V2Transport::ProcessReceivedKeyBytes() noexcept
// they receive our uniformly random key and garbage, but detecting this case specially
// means we can log it.
static constexpr std::array<uint8_t, 12> MATCH = {'v', 'e', 'r', 's', 'i', 'o', 'n', 0, 0, 0, 0, 0};
- static constexpr size_t OFFSET = std::tuple_size_v<CMessageHeader::MessageStartChars>;
+ static constexpr size_t OFFSET = std::tuple_size_v<MessageStartChars>;
if (!m_initiating && m_recv_buffer.size() >= OFFSET + MATCH.size()) {
if (std::equal(MATCH.begin(), MATCH.end(), m_recv_buffer.begin() + OFFSET)) {
LogPrint(BCLog::NET, "V2 transport error: V1 peer with wrong MessageStart %s\n",