forked from bitcoinfibre/bitcoinfibre
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Substitute quota-based throttling with blocking tx
If socket send buffer is full, block until it has space. This will allow us to constrain the throughput externally, e.g., using Linux traffic shaping tools. The biggest advantage of the external throttling approach is that we can also rate-limit other sources of traffic that are sent over satellite in addition to bitcoin traffic, and which compete for satellite link capacity. With blocking transmissions, the quota-based throttling approach becomes unnecessary. Also, by removing it, we can avoid potential issues with inaccurate sleeping and quota capping. In the new implementation, we poll the Tx socket for space and change queues when the socket blocks (after a timeout). This way we can keep going on a faster socket while the slower socket waits.
- Loading branch information
1 parent
5eb91ab
commit 847ac2c
Showing
1 changed file
with
20 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters