Conversation
Fall back to the receive address book when a legacy account record is missing, preventing getaccountaddress from creating a duplicate after a GUI or RPC receive address was labeled.\n\nRefs RavenProject#1155
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.
Problem
Creating a labeled receiving address from the Receive UI stores the label in the address book but not in the legacy account record. A later
getaccountaddresscall treats the account as missing and creates a duplicate address.Approach
When the legacy account record has no current public key, search existing receive-purpose address-book entries for the account label. If a matching wallet key exists, reuse it and backfill the account record instead of generating a new address.
Test plan
test/functional/wallet_labels.pyto create a labeled receive address before callinggetaccountaddress, then assert the same address is returned and no duplicate is listed.python3 -m py_compile test/functional/wallet_labels.pypython3 test/functional/wallet_labels.py --helpgit diff --checkRisk / exclusions
Wallet-account/RPC behavior only; no consensus or transaction-format changes. Full functional execution was not possible on the Pi because
src/ravendis not built; this requires the authorized PC build.Refs #1155