aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_basic/connection_context.h
diff options
context:
space:
mode:
authorLee Clagett <code@leeclagett.com>2020-12-29 19:58:53 -0500
committerLee Clagett <code@leeclagett.com>2020-12-29 19:58:53 -0500
commit7d67a2dde0d2547e19650f5c6fa33d54b3f8b14d (patch)
treee90a9666400d19545199b6ed46be34c365cb5c1b /src/cryptonote_basic/connection_context.h
parentMerge pull request #7222 (diff)
downloadmonero-7d67a2dde0d2547e19650f5c6fa33d54b3f8b14d.tar.xz
Add aggressive restrictions to pre-handshake p2p buffer limit
Diffstat (limited to 'src/cryptonote_basic/connection_context.h')
-rw-r--r--src/cryptonote_basic/connection_context.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cryptonote_basic/connection_context.h b/src/cryptonote_basic/connection_context.h
index 9e012f8f5..e5c00d4f3 100644
--- a/src/cryptonote_basic/connection_context.h
+++ b/src/cryptonote_basic/connection_context.h
@@ -55,6 +55,8 @@ namespace cryptonote
state_normal
};
+ bool handshake_complete() const noexcept { return m_state != state_before_handshake; }
+
state m_state;
std::vector<std::pair<crypto::hash, uint64_t>> m_needed_objects;
std::unordered_set<crypto::hash> m_requested_objects;