diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2020-12-07 10:07:33 -0600 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2020-12-07 10:07:33 -0600 |
| commit | 3d2a50a5c035d59c804740229bb0829ad04845ee (patch) | |
| tree | cee83a87f7e754c0369e032104945f2a04d7b9b0 /src/cryptonote_basic | |
| parent | 7ca4ef0d749848dd4c4368d00dcb7a4c31dfed9c (diff) | |
| parent | ff7fdf6db2534d243beefaea6a4c1be10b634a34 (diff) | |
| download | monzero-core-3d2a50a5c035d59c804740229bb0829ad04845ee.tar.gz monzero-core-3d2a50a5c035d59c804740229bb0829ad04845ee.tar.xz monzero-core-3d2a50a5c035d59c804740229bb0829ad04845ee.zip | |
Merge pull request #7055
ff7fdf6 protocol: drop peers that don't reply to queries (moneromooo-monero)
89e984d keep only the last seen node on a given host in the white list (moneromooo-monero)
c74d8ff protocol: drop peers that decrease claimed height (moneromooo-monero)
61f5001 protocol: add scoring system to drop peers that don't behave (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_basic')
| -rw-r--r-- | src/cryptonote_basic/connection_context.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cryptonote_basic/connection_context.h b/src/cryptonote_basic/connection_context.h index 0c3a94054..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_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 { @@ -66,7 +67,8 @@ 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; + int m_expect_response; }; inline std::string get_protocol_state_string(cryptonote_connection_context::state s) |
