aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_basic/connection_context.h
diff options
context:
space:
mode:
authormoneromooo <moneromoo@nowhere.nowhere.nowhere>2020-12-01 22:25:07 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2020-12-04 01:55:01 +0000
commit1382b17aa11b8cdb1c31c75052ef1459f1d137a2 (patch)
treeec033d8704e55f998c1becf15238f63739b101bf /src/cryptonote_basic/connection_context.h
parentMerge pull request #7010 (diff)
downloadmonero-1382b17aa11b8cdb1c31c75052ef1459f1d137a2.tar.xz
protocol: add scoring system to drop peers that don't behave
Diffstat (limited to '')
-rw-r--r--src/cryptonote_basic/connection_context.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cryptonote_basic/connection_context.h b/src/cryptonote_basic/connection_context.h
index 0c3a94054..745b23a93 100644
--- a/src/cryptonote_basic/connection_context.h
+++ b/src/cryptonote_basic/connection_context.h
@@ -43,7 +43,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_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) {}
enum state
{
@@ -66,7 +66,7 @@ namespace cryptonote
uint16_t m_rpc_port;
uint32_t m_rpc_credits_per_hash;
bool m_anchor;
- //size_t m_score; TODO: add score calculations
+ int32_t m_score;
};
inline std::string get_protocol_state_string(cryptonote_connection_context::state s)