aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_basic/connection_context.h
diff options
context:
space:
mode:
authormoneromooo <moneromoo@nowhere.nowhere.nowhere>2020-12-03 13:22:52 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2020-12-06 15:57:23 +0000
commitce26c5b2dd081265dae76d79b3e76f1cdac3a732 (patch)
tree906b392e3a15df41ef5b5eadf61c08faf373783d /src/cryptonote_basic/connection_context.h
parentkeep only the last seen node on a given host in the white list (diff)
downloadmonero-ce26c5b2dd081265dae76d79b3e76f1cdac3a732.tar.xz
protocol: drop peers that don't reply to queries
Diffstat (limited to '')
-rw-r--r--src/cryptonote_basic/connection_context.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cryptonote_basic/connection_context.h b/src/cryptonote_basic/connection_context.h
index 745b23a93..8d26e5638 100644
--- a/src/cryptonote_basic/connection_context.h
+++ b/src/cryptonote_basic/connection_context.h
@@ -43,7 +43,8 @@ namespace cryptonote
{
cryptonote_connection_context(): m_state(state_before_handshake), m_remote_blockchain_height(0), m_last_response_height(0),
m_last_request_time(boost::date_time::not_a_date_time), m_callback_request_count(0),
- m_last_known_hash(crypto::null_hash), m_pruning_seed(0), m_rpc_port(0), m_rpc_credits_per_hash(0), m_anchor(false), m_score(0) {}
+ m_last_known_hash(crypto::null_hash), m_pruning_seed(0), m_rpc_port(0), m_rpc_credits_per_hash(0), m_anchor(false), m_score(0),
+ m_expect_response(0) {}
enum state
{
@@ -67,6 +68,7 @@ namespace cryptonote
uint32_t m_rpc_credits_per_hash;
bool m_anchor;
int32_t m_score;
+ int m_expect_response;
};
inline std::string get_protocol_state_string(cryptonote_connection_context::state s)