wallet, qt: forgetting a key without watch-only also clears its label (#46) #48

Merged
btcbob merged 1 commit from fix/46-forget-clears-entry into main 2026-11-01 15:26:59 +00:00
Owner

Click-testing "Forget private key..." (#46) on Windows: the key was removed, but the address stayed in File → Receiving addresses with its label, so nothing looked different. After a restart it moved on, and trying to forget it again said the key wasn't in the wallet.

  • CWallet::RemovePrivKey now deletes the address-book entry when keepwatchonly is false, so the row disappears at once. A watched address keeps its entry.
  • It checks the key really is gone before reporting success.
  • The GUI confirmation says which happened ("removed from this list" / "stays in this list as watch-only").
  • removeprivkey help says the label goes too without keepwatchonly.
  • qa/rpc-tests/removeprivkey.py checks the entry is gone, or kept with keepwatchonly.

Tested: qa/run-all.sh 27 passed, 0 failed (Linux). Windows build 80414d38 click-tested on regtest by btcbob: the address disappears from Receiving addresses right after forgetting it.

🤖 Generated with Claude Code

Click-testing "Forget private key..." (#46) on Windows: the key was removed, but the address stayed in File → Receiving addresses with its label, so nothing looked different. After a restart it moved on, and trying to forget it again said the key wasn't in the wallet. - `CWallet::RemovePrivKey` now deletes the address-book entry when `keepwatchonly` is false, so the row disappears at once. A watched address keeps its entry. - It checks the key really is gone before reporting success. - The GUI confirmation says which happened ("removed from this list" / "stays in this list as watch-only"). - `removeprivkey` help says the label goes too without `keepwatchonly`. - `qa/rpc-tests/removeprivkey.py` checks the entry is gone, or kept with `keepwatchonly`. Tested: `qa/run-all.sh` 27 passed, 0 failed (Linux). Windows build 80414d38 click-tested on regtest by btcbob: the address disappears from Receiving addresses right after forgetting it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Click-testing "Forget private key..." on Windows: the key went, but the row
stayed in Receiving addresses with its label, so nothing looked different, and
after a restart the address moved on. RemovePrivKey now deletes the
address-book entry when keepwatchonly is false, which drops the row at once,
and checks the key really is gone before reporting success. A watched address
keeps its entry. The GUI confirmation says which of the two happened.

removeprivkey.py checks the entry is gone, or kept with keepwatchonly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
btcbob merged commit 3f047b7fe9 into main 2026-11-01 15:26:59 +00:00
btcbob deleted branch fix/46-forget-clears-entry 2026-11-01 15:26:59 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
SubGeniusFinance/dobbscoin-source!48
No description provided.