Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize handling of non-existing transactions in the Electrum client #3809

Merged
merged 1 commit into from
Apr 23, 2024

Commits on Apr 23, 2024

  1. 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.
    lukasz-zimnoch committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    4abcd8a View commit details
    Browse the repository at this point in the history