From 96fa95361f68dd8169fa60e73290afae47445299 Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Wed, 6 Jul 2016 21:18:38 -0400 Subject: Improve handling of unconnecting headers When processing a headers message that looks like a block announcement, send peer a getheaders if the headers message won't connect. Apply DoS points after too many consecutive unconnecting headers messages. --- src/main.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main.h') diff --git a/src/main.h b/src/main.h index 7ea570d859..65ae2488f9 100644 --- a/src/main.h +++ b/src/main.h @@ -138,6 +138,9 @@ static const bool DEFAULT_FEEFILTER = true; /** Maximum number of headers to announce when relaying blocks with headers message.*/ static const unsigned int MAX_BLOCKS_TO_ANNOUNCE = 8; +/** Maximum number of unconnecting headers announcements before DoS score */ +static const int MAX_UNCONNECTING_HEADERS = 10; + static const bool DEFAULT_PEERBLOOMFILTERS = true; struct BlockHasher -- cgit v1.2.3