forked from decred/dcrstakepool
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent unnecessary wallet rescans. (decred#519)
* Prevent unnecessary wallet rescans. This is acheived by adding a new stakepoold RPC. Previously we used a single RPC to import redeem scripts, regardless of whether they were new or historic. A rescan was triggered every time a script was imported. This was problematic because on startup, dcrstakepool performs consistency checks against each back-end and may import multiple scripts into a single wallet simultaneously. I have split the `ImportScript` RPC into two `ImportNewScript` and `ImportMissingScripts`. `ImportNewScript` will never trigger a rescan because a new script should have no associated history. This is used when a new wallet is connected to the VSP. `ImportMissingScripts` is used by the consistency checks, and will import multiple scripts before triggering a single rescan.
- Loading branch information
1 parent
ab02b5e
commit 36e897c
Showing
6 changed files
with
381 additions
and
211 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
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
Oops, something went wrong.