This repository was archived by the owner on Dec 16, 2024. It is now read-only.
Create addresses which are found in the network but are not in wallet-cli#184
Open
Create addresses which are found in the network but are not in wallet-cli#184
Conversation
HDauven
approved these changes
Aug 22, 2023
Member
HDauven
left a comment
There was a problem hiding this comment.
LGTM
Please do update the changelog though.
herr-seppia
reviewed
Aug 23, 2023
src/clients/sync.rs
Outdated
| if vk.owns(¬e) { | ||
| if let Some(existing_addresses) = existing_addresses { | ||
| if existing_addresses.get(i).is_none() { | ||
| addresses_to_create.add_assign(1); |
Member
There was a problem hiding this comment.
This way, you are loosing the index of the address you need to create.
Member
There was a problem hiding this comment.
Additionally:
- if you find multiple notes belonging to the same address, you're counting them multiple times
- if there are no existing_address you're not counting at all
- even if the above are fixed, what if I have 5 existing address and I find a note that belong to the address with index=50? Remember that we check notes against all MAX_Addresses
I suggest to change the behaviors to return the "max_address_index" found instead of the missing addresses count, and then create all the missing address to reach "max_address_index"
Anyway, some tests for this new feature would be welcome
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
If the a note is owned by a vk and that vk isn't in wallet, we create it in sequence and then save latest wallet file
Closes #80