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.
This commit is contained in:
moneromooo-monero 2017-08-09 20:49:24 +01:00
parent 181a008aa3
commit f90bbe2a5c
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
2 changed files with 56 additions and 67 deletions

View file

@ -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;