aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_basic/connection_context.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2020-12-25 20:29:11 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2020-12-25 20:30:39 +0000
commitefe83982d33aaa63c31feb4cf4864a219ead45db (patch)
tree760a25196011b6324614591cae359a7e00104b2d /src/cryptonote_basic/connection_context.h
parentMerge pull request #7151 (diff)
downloadmonero-efe83982d33aaa63c31feb4cf4864a219ead45db.tar.xz
protocol: drop nodes if they claim new data but only give stale data
Some joker is spending time actually doing this
Diffstat (limited to '')
-rw-r--r--src/cryptonote_basic/connection_context.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cryptonote_basic/connection_context.h b/src/cryptonote_basic/connection_context.h
index dfc59631f..a735ae06b 100644
--- a/src/cryptonote_basic/connection_context.h
+++ b/src/cryptonote_basic/connection_context.h
@@ -44,7 +44,7 @@ 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_expect_response(0) {}
+ m_expect_response(0), m_num_requested(0) {}
enum state
{
@@ -70,6 +70,7 @@ namespace cryptonote
int32_t m_score;
int m_expect_response;
uint64_t m_expect_height;
+ size_t m_num_requested;
};
inline std::string get_protocol_state_string(cryptonote_connection_context::state s)