From f90bbe2a5cdbd438a4b2c5e4bbfda29e2b752a1b Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Wed, 9 Aug 2017 20:49:24 +0100 Subject: cryptonote_protocol: keep target in sync with dropped connections When a node is dropped, we stop considering its claimed blockchain height as a factor in the target height calculation. This prevents a runaway chain from being still thought to be the target even if the nodes carrying it are dropped. --- src/cryptonote_protocol/cryptonote_protocol_handler.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/cryptonote_protocol/cryptonote_protocol_handler.h') diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.h b/src/cryptonote_protocol/cryptonote_protocol_handler.h index dcee03f66..f30aebf3a 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.h +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.h @@ -130,6 +130,8 @@ namespace cryptonote size_t get_synchronizing_connections_count(); bool on_connection_synchronized(); bool should_download_next_span(cryptonote_connection_context& context) const; + void drop_connection(cryptonote_connection_context &context, bool add_fail, bool flush_all_spans); + t_core& m_core; nodetool::p2p_endpoint_stub m_p2p_stub; -- cgit v1.2.3