aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorSuhas Daftuar <[email protected]>2016-07-06 21:18:38 -0400
committerSuhas Daftuar <[email protected]>2016-07-12 13:12:40 -0400
commit96fa95361f68dd8169fa60e73290afae47445299 (patch)
tree0cbfc0a694054e7cda668148f2d5508109f5ff3e /src/main.h
parentqt: periodic translations update (diff)
downloaddiscoin-96fa95361f68dd8169fa60e73290afae47445299.tar.xz
discoin-96fa95361f68dd8169fa60e73290afae47445299.zip
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.
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.h b/src/main.h
index 7ea570d85..65ae2488f 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