mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-25 06:19:25 +02:00
net_processing: Make MAX_HEADERS_RESULTS a PeerManager option
This commit is contained in:
@@ -31,6 +31,9 @@ static const bool DEFAULT_PEERBLOOMFILTERS = false;
|
||||
static const bool DEFAULT_PEERBLOCKFILTERS = false;
|
||||
/** Maximum number of outstanding CMPCTBLOCK requests for the same block. */
|
||||
static const unsigned int MAX_CMPCTBLOCKS_INFLIGHT_PER_BLOCK = 3;
|
||||
/** Number of headers sent in one getheaders result. We rely on the assumption that if a peer sends
|
||||
* less than this number, we reached its tip. Changing this value is a protocol upgrade. */
|
||||
static const unsigned int MAX_HEADERS_RESULTS = 2000;
|
||||
|
||||
struct CNodeStateStats {
|
||||
int nSyncHeight = -1;
|
||||
@@ -71,6 +74,8 @@ public:
|
||||
//! Whether or not the internal RNG behaves deterministically (this is
|
||||
//! a test-only option).
|
||||
bool deterministic_rng{false};
|
||||
//! Number of headers sent in one getheaders message result.
|
||||
uint32_t max_headers_result{MAX_HEADERS_RESULTS};
|
||||
};
|
||||
|
||||
static std::unique_ptr<PeerManager> make(CConnman& connman, AddrMan& addrman,
|
||||
|
||||
Reference in New Issue
Block a user