-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize handling of non-existing transactions in the Electrum client
Electrum client exposes two methods for getting entire transactions and transaction confirmations from the Bitcoin blockchain. Those methods retry Electrum requests in case of any error. Retries are done in the exponential backoff scheme until a timeout of 2 minutes is hit. However, when the given transaction does not exist on the chain, there is no point to retry. This can be harmful for scenarios like deposit sweep generation that need to check multiple transactions in a limited time window. If there are multiple non-existing transactions that are checked during the process, 2 minutes per such transaction is wasted. Here we improve the situation by introducing an error type check. If the error says about not found transaction, retries are not executed.
- Loading branch information
1 parent
795d284
commit 4abcd8a
Showing
2 changed files
with
82 additions
and
41 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
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