diff options
author | Suhas Daftuar <sdaftuar@chaincode.com> | 2016-07-06 21:18:38 -0400 |
---|---|---|
committer | Suhas Daftuar <sdaftuar@chaincode.com> | 2016-07-12 13:12:40 -0400 |
commit | 96fa95361f68dd8169fa60e73290afae47445299 (patch) | |
tree | 0cbfc0a694054e7cda668148f2d5508109f5ff3e /src/main.h | |
parent | b978701ba1822140452d35f037ce776fdcba0175 (diff) |
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.h | 3 |
1 files changed, 3 insertions, 0 deletions
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 |