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

Fix wallet sync not finding coins of addresses which are not cached #672

Commits on Jul 20, 2022

  1. Fix wallet sync not finding coins of addresses which are not cached

    Previously, electrum-based blockchain implementations only synced for
    `scriptPubKey`s that are already cached in `Database`.
    
    This PR introduces a feedback mechanism, that uses `stop_gap` and the
    difference between "current index" and "last active index" to determine
    whether we need to cache more `scriptPubKeys`.
    
    The `WalletSync::wallet_setup` trait now may return an
    `Error::MissingCachedScripts` error which contains the number of extra
    `scriptPubKey`s to cache, in order to satisfy `stop_gap` for the next call.
    
    `Wallet::sync` now calls `WalletSync` in a loop, cacheing inbetween
    subsequent calls (if needed).
    evanlinjin committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    5c940c3 View commit details
    Browse the repository at this point in the history