aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordhruv <856960+dhruv@users.noreply.github.com>2022-09-07 15:59:49 -0700
committerPieter Wuille <pieter@wuille.net>2023-10-02 18:11:11 -0400
commit05d19fbcc10f26c7f1e3a9afc660eb7fa71b1d8c (patch)
tree52a785ca14387b862ed7fc17be9b7e2536dc5648 /src
parentb815cce50e4bfa0efea8ea02659b7042c8fb18be (diff)
test: Functional test for opportunistic encryption
Co-authored-by: Pieter Wuille <bitcoin-dev@wuille.net>
Diffstat (limited to 'src')
-rw-r--r--src/net.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/net.cpp b/src/net.cpp
index a3792b7d49..6b2ef5f43d 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1552,6 +1552,10 @@ void V2Transport::MarkBytesSent(size_t bytes_sent) noexcept
LOCK(m_send_mutex);
if (m_send_state == SendState::V1) return m_v1_fallback.MarkBytesSent(bytes_sent);
+ if (m_send_state == SendState::AWAITING_KEY && m_send_pos == 0 && bytes_sent > 0) {
+ LogPrint(BCLog::NET, "start sending v2 handshake to peer=%d\n", m_nodeid);
+ }
+
m_send_pos += bytes_sent;
Assume(m_send_pos <= m_send_buffer.size());
if (m_send_pos >= CMessageHeader::HEADER_SIZE) {