mirror of
https://github.com/monero-project/monero.git
synced 2025-05-02 12:06:04 -04:00
protocol: drop nodes if they claim new data but only give stale data
Some joker is spending time actually doing this
This commit is contained in:
parent
3bd6ed94d7
commit
efe83982d3
3 changed files with 18 additions and 5 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue