Repository navigation
fix(key-wallet): return the next index of an exhausted single-pool account - #1341
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 48 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
Waiting for bot review — coderabbitai not yet. Wait for the missing reviews, or a writer can post |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #1341 +/- ##
==========================================
- Coverage 85.17% 85.17% -0.01%
==========================================
Files 268 268
Lines 68101 68100 -1
==========================================
- Hits 58005 58004 -1
Misses 10096 10096
|
|
Bots are done — your move: address xdustinface requested changes, then post |
xdustinface
left a comment
There was a problem hiding this comment.
The fix has no regression test. The PR only touches managed_account_trait.rs, and nothing in the workspace calls get_next_address_index, get_next_receive_address_index or get_next_change_address_index. With the old code, a CoinJoin account whose 100 external addresses are all marked used returns None, and with your change it returns Some(100), so a test can lock this in. Please add one in key-wallet/src/tests/address_reservation_tests.rs next to test_reserve_receive_on_non_standard_account_errors, which already builds a CoinJoin ManagedCoreFundsAccount: mark every address used via mark_address_used and assert get_next_address_index() == Some(highest_generated + 1).
When every generated address of a single-pool account (CoinJoin, Identity*, AssetLock*, Provider*, DashPay*, PlatformPayment) was used,
get_next_address_indexreturnedNone. A Standard account returnshighest_generated + 1in the same case.The three index getters now share one helper, so single-pool accounts also return the next index to derive.
Closes #730
PR Hygiene ·
dc96966/self-reviewedkey-wallet(key-wallet/src/managed_account/managed_account_trait.rs) — QuantumExplorer or xdustinfaceWhen every merge requirement is met, the
PR Hygienecheck passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.