mirror of https://github.com/bitcoin/bitcoin.git
Merge bitcoin/bitcoin#28592: p2p: Increase tx relay rate
b81f37031c
p2p: Increase tx relay rate (Anthony Towns) Pull request description: In the presence of smaller transactions on the network, blocks can sustain a higher relay rate than 7tx/second. In this event, the per-peer inventory queues can grow too large. This commit bumps the rate up to 14 tx/s (for inbound peers), increasing the safety margin by a factor of 2. Outbound peers continue to receive relayed transactions at 2.5x the rate of inbound peers, for a rate of 35tx/second. ACKs for top commit: sipa: ACKb81f37031c
achow101: ACKb81f37031c
darosior: utACKb81f37031c
. glozow: utACKb81f37031c
Tree-SHA512: 854ea0824d5f4c629f1dceb9ee61cc9226c8f0d4d26664737e68db917f65341d4800362ab55ed32673db920b2b59aa116b4cb9ee063367b2e43c94a904b41c08
This commit is contained in:
commit
56c6daa64f
|
@ -167,7 +167,7 @@ static constexpr auto INBOUND_INVENTORY_BROADCAST_INTERVAL{5s};
|
|||
static constexpr auto OUTBOUND_INVENTORY_BROADCAST_INTERVAL{2s};
|
||||
/** Maximum rate of inventory items to send per second.
|
||||
* Limits the impact of low-fee transaction floods. */
|
||||
static constexpr unsigned int INVENTORY_BROADCAST_PER_SECOND = 7;
|
||||
static constexpr unsigned int INVENTORY_BROADCAST_PER_SECOND{14};
|
||||
/** Target number of tx inventory items to send per transmission. */
|
||||
static constexpr unsigned int INVENTORY_BROADCAST_TARGET = INVENTORY_BROADCAST_PER_SECOND * count_seconds(INBOUND_INVENTORY_BROADCAST_INTERVAL);
|
||||
/** Maximum number of inventory items to send per transmission. */
|
||||
|
|
Loading…
Reference in New Issue