Skip to content

release/3.x: map keychain in mark_used and unmark_used (backport #507) - #648

Merged
noahjoeris merged 1 commit into
bitcoindevkit:release/3.xfrom
noahjoeris:backport3.x/mark-used-keychain
Nov 15, 2026
Merged

noahjoeris merged 1 commit into
bitcoindevkit:release/3.xfrom
noahjoeris:backport3.x/mark-used-keychain

Conversation

@noahjoeris

Copy link
Copy Markdown
Contributor

Description

Backport of #507 to release/3.x.

Cherry-picked from master: f66a65e.

Changelog notice

Fixed Wallet::mark_used and Wallet::unmark_used doing nothing on single-descriptor wallets when passed KeychainKind::Internal.

Before submitting

`mark_used` and `unmark_used` passed the caller-supplied `KeychainKind`
straight to the index. For single-descriptor wallets, this meant marking
or unmarking an index on `Internal` was a no-op, since that wallet only
tracks the `External` keychain.

Route the keychain through `map_keychain` first, consistent with the
other methods that take a `KeychainKind`, so a single-keychain wallet
resolves `Internal` to `External`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(cherry picked from commit f66a65e)
@noahjoeris
noahjoeris requested a review from a team as a code owner November 10, 2026 18:41
@noahjoeris noahjoeris added this to the Wallet 3.2.1 milestone Nov 10, 2026
@github-project-automation github-project-automation Bot moved this to Triage in BDK Wallet Nov 10, 2026
@codecov

codecov Bot commented Nov 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.66%. Comparing base (7922641) to head (ce2a3d6).

Additional details and impacted files
@@               Coverage Diff               @@
##           release/3.x     #648      +/-   ##
===============================================
+ Coverage        81.65%   81.66%   +0.01%     
===============================================
  Files               25       25              
  Lines             6345     6349       +4     
  Branches           304      304              
===============================================
+ Hits              5181     5185       +4     
  Misses            1054     1054              
  Partials           110      110              
Flag Coverage Δ
rust 81.66% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@noahjoeris noahjoeris moved this from Triage to Needs Review in BDK Wallet Nov 10, 2026
@noahjoeris noahjoeris self-assigned this Nov 10, 2026

@thunderbiscuit thunderbiscuit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK ce2a3d6.

@noahjoeris
noahjoeris merged commit ce256cc into bitcoindevkit:release/3.x Nov 15, 2026
14 checks passed
@github-project-automation github-project-automation Bot moved this from Needs Review to Done in BDK Wallet Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants