aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_protocol/cryptonote_protocol_handler.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-08-09 20:49:24 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-08-09 20:49:24 +0100
commitf90bbe2a5cdbd438a4b2c5e4bbfda29e2b752a1b (patch)
tree4a728a8bca1f0dd30d444dba6fda50beb44d2de1 /src/cryptonote_protocol/cryptonote_protocol_handler.h
parentMerge pull request #2271 (diff)
downloadmonero-f90bbe2a5cdbd438a4b2c5e4bbfda29e2b752a1b.tar.xz
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.
Diffstat (limited to '')
-rw-r--r--src/cryptonote_protocol/cryptonote_protocol_handler.h2
1 files changed, 2 insertions, 0 deletions
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<connection_context> m_p2p_stub;