[Wallet] Improve rescan API + avoid permanent locks during RescanFromTime#2281
Merged
furszy merged 10 commits intoPIVX-Project:masterfrom Apr 13, 2021
Merged
[Wallet] Improve rescan API + avoid permanent locks during RescanFromTime#2281furszy merged 10 commits intoPIVX-Project:masterfrom
furszy merged 10 commits intoPIVX-Project:masterfrom
Conversation
>>> backports bitcoin/bitcoin@ccf84bb This change has no effect on wallet behavior. On wallet startup, the transaction scan avoids reading any blocks with timestamps older than the wallet birthday (less than nTimeFirstKey - TIMESTAMP_WINDOW). This block skipping code currently resides in CWallet::ScanForWalletTransactions but it doesn't really belong there because it makes the implementation unnecessarily fragile and hard to understand, and it never has any effect except at startup (because all other callers do their rescans based on timestamps other than, but always greater or equal to, nTimeFirstKey).
No change in behavior.
This way CWallet::RescanFromTime callers don't need to subtract TIMESTAMP_WINDOW themselves. This is pure refactoring, there is no change in behavior.
>>> backports bitcoin/bitcoin@bc356b4 and adapt RPC importsaplingkey and importsaplingviewingkey
a01d3cd to
29c267e
Compare
Author
|
Rebased on master. Ready to go. |
Fuzzbawls
reviewed
Apr 13, 2021
Collaborator
Fuzzbawls
left a comment
There was a problem hiding this comment.
Functional ACK
Great improvement in terms of the wallet's responsiveness! have been able to import/rescan addresses and wallets with thousands of transactions without issue.
One commented change in the importmulti help output that shouldn't be, otherwise good to go
Fuzzbawls
approved these changes
Apr 13, 2021
furszy
approved these changes
Apr 13, 2021
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on top of:
Backports bitcoin#10412, and bitcoin#11281