Skip to content

Wallet: Reuse labeled receive address - #1318

Open
Tabakkui wants to merge 1 commit into
RavenProject:developfrom
Tabakkui:fix/issue-1155-account-address-duplicate
Open

Tabakkui wants to merge 1 commit into
RavenProject:developfrom
Tabakkui:fix/issue-1155-account-address-duplicate

Conversation

@Tabakkui

Copy link
Copy Markdown

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 getaccountaddress call 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

  • Extended test/functional/wallet_labels.py to create a labeled receive address before calling getaccountaddress, then assert the same address is returned and no duplicate is listed.
  • python3 -m py_compile test/functional/wallet_labels.py
  • python3 test/functional/wallet_labels.py --help
  • git diff --check

Risk / exclusions

Wallet-account/RPC behavior only; no consensus or transaction-format changes. Full functional execution was not possible on the Pi because src/ravend is not built; this requires the authorized PC build.

Refs #1155

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant