diff options
author | Greg Sanders <gsanders87@gmail.com> | 2023-05-16 15:36:38 -0400 |
---|---|---|
committer | Greg Sanders <gsanders87@gmail.com> | 2023-05-23 13:07:49 -0400 |
commit | 03423f8bd12b95a06a4a9d8377e781625dd38aae (patch) | |
tree | f8ab6335e73a791de8791c36d917116c7b735e62 /src/net_processing.h | |
parent | 13f9b20b4cb2f3f26e81184a77e9cf1f626d4f57 (diff) |
Support up to 3 parallel compact block txn fetchings
A single outbound slot is required, so if the first two slots
are taken by inbound in-flights, the node will reject additional
unless they are coming from outbound.
This means in the case where a fast sybil peer is attempting to
stall out a node, a single high bandwidth outbound peer can
mitigate the attack.
Diffstat (limited to 'src/net_processing.h')
-rw-r--r-- | src/net_processing.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/net_processing.h b/src/net_processing.h index af9a02139b..deebb24c94 100644 --- a/src/net_processing.h +++ b/src/net_processing.h @@ -22,6 +22,8 @@ static const bool DEFAULT_PEERBLOOMFILTERS = false; static const bool DEFAULT_PEERBLOCKFILTERS = false; /** Threshold for marking a node to be discouraged, e.g. disconnected and added to the discouragement filter. */ static const int DISCOURAGEMENT_THRESHOLD{100}; +/** Maximum number of outstanding CMPCTBLOCK requests for the same block. */ +static const unsigned int MAX_CMPCTBLOCKS_INFLIGHT_PER_BLOCK = 3; struct CNodeStateStats { int nSyncHeight = -1; |