Skip to content

Commit 56c6daa

Browse files
committed
Merge bitcoin/bitcoin#28592: p2p: Increase tx relay rate
b81f370 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: ACK b81f370 achow101: ACK b81f370 darosior: utACK b81f370. glozow: utACK b81f370 Tree-SHA512: 854ea0824d5f4c629f1dceb9ee61cc9226c8f0d4d26664737e68db917f65341d4800362ab55ed32673db920b2b59aa116b4cb9ee063367b2e43c94a904b41c08
2 parents edb871c + b81f370 commit 56c6daa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/net_processing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ static constexpr auto INBOUND_INVENTORY_BROADCAST_INTERVAL{5s};
167167
static constexpr auto OUTBOUND_INVENTORY_BROADCAST_INTERVAL{2s};
168168
/** Maximum rate of inventory items to send per second.
169169
* Limits the impact of low-fee transaction floods. */
170-
static constexpr unsigned int INVENTORY_BROADCAST_PER_SECOND = 7;
170+
static constexpr unsigned int INVENTORY_BROADCAST_PER_SECOND{14};
171171
/** Target number of tx inventory items to send per transmission. */
172172
static constexpr unsigned int INVENTORY_BROADCAST_TARGET = INVENTORY_BROADCAST_PER_SECOND * count_seconds(INBOUND_INVENTORY_BROADCAST_INTERVAL);
173173
/** Maximum number of inventory items to send per transmission. */

0 commit comments

Comments
 (0)