From 05d19fbcc10f26c7f1e3a9afc660eb7fa71b1d8c Mon Sep 17 00:00:00 2001 From: dhruv <856960+dhruv@users.noreply.github.com> Date: Wed, 7 Sep 2022 15:59:49 -0700 Subject: test: Functional test for opportunistic encryption Co-authored-by: Pieter Wuille --- src/net.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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) { -- cgit v1.2.3