Add header spam protection
This commit is contained in:
10
src/main.h
10
src/main.h
@@ -3,6 +3,9 @@
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
// Header spam protection by Qtum
|
||||
// Copyright (c) 2016-2019 The Qtum developers
|
||||
|
||||
#ifndef BITCOIN_MAIN_H
|
||||
#define BITCOIN_MAIN_H
|
||||
|
||||
@@ -139,6 +142,13 @@ static const bool DEFAULT_TESTSAFEMODE = false;
|
||||
/** Default for using fee filter */
|
||||
static const bool DEFAULT_FEEFILTER = true;
|
||||
|
||||
/** Default for -headerspamfilter, use header spam filter */
|
||||
static const bool DEFAULT_HEADER_SPAM_FILTER = true;
|
||||
/** Default for -headerspamfiltermaxsize, maximum size of the list of indexes in the header spam filter */
|
||||
static const unsigned int DEFAULT_HEADER_SPAM_FILTER_MAX_SIZE = 500;
|
||||
/** Default for -headerspamfiltermaxavg, maximum average size of an index occurrence in the header spam filter */
|
||||
static const unsigned int DEFAULT_HEADER_SPAM_FILTER_MAX_AVG = 10;
|
||||
|
||||
/** Maximum number of headers to announce when relaying blocks with headers message.*/
|
||||
static const unsigned int MAX_BLOCKS_TO_ANNOUNCE = 8;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user