-
Notifications
You must be signed in to change notification settings - Fork 214
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
endpoint: force wallet resync #1268
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
92c2aa0
extend swagger specification with 'forceResync'
KtorZ 206affc
extend API with 'forceResync' operation
KtorZ 3d9bc77
implement 'forceResync' handler properly
KtorZ 4b06845
add integration test for the 'forceResync' endpoint
KtorZ d196fd1
preserve in-memory database states between calls
KtorZ 423296b
revise 'expectResponseCode' to give more details on failure
KtorZ 5eae1fa
re-generate nix machinery
KtorZ fab6e17
fix database closing error handling
KtorZ 9babcc2
use on-disk database in integration tests
KtorZ File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this part. Is it for all the transactions, even if they are in ledger?
Why I'm asking: when you delete a wallet and create it again you have your transaction history available... My understanding and expectation of the forceResync would be to be an equivalent of delete and create (but without the need of deleting and creating a wallet again), am I wrong? (I bet I am...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@piotr-iohk force-resync is not equivalent to deleting and re-creating the wallet. It's actually equivalent to (and is a) rollback to the genesis block. So, after this, some transaction will be put back in pending such that, users can still track them.
The annoying part with deleting and re-creating your wallet is also that you completely loose track of your wallet history. If you attempted to made a payment, it won't show up unless visible in the ledger. But you may still have transaction floating around in mempools that don't show up in your wallet. Whereas, by using force resync here, you'll still see them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this statement may be somewhat misleading. After reading it I thought that after doing force resync all my incoming txs will be erased and not visible at all and outgoing will become pending. And it will be a finite state. But if they are in the ledger they will be discovered again and visible again. Hence the first comment, cause it was a bit surprising to me.