From d660f22ed1aa544750e57b6f90fcf4e3e2ded038 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Tue, 8 Dec 2020 17:55:24 +0000 Subject: protocol: drop origin IP if a block fails to verify in sync mode It would otherwise be possible for a peer to send bad blocks, then disconnect and reconnect again, escaping bans --- src/cryptonote_protocol/cryptonote_protocol_handler.h | 1 + 1 file changed, 1 insertion(+) (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 ee3a67198..b416b86c8 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.h +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.h @@ -141,6 +141,7 @@ namespace cryptonote bool should_ask_for_pruned_data(cryptonote_connection_context& context, uint64_t first_block_height, uint64_t nblocks, bool check_block_weights) const; void drop_connection(cryptonote_connection_context &context, bool add_fail, bool flush_all_spans); void drop_connection_with_score(cryptonote_connection_context &context, unsigned int score, bool flush_all_spans); + void drop_connections(const epee::net_utils::network_address address); bool kick_idle_peers(); bool check_standby_peers(); bool update_sync_search(); -- cgit v1.2.3