wallet: `NotifyCanGetAddressesChanged` when advancing `next_index` #34993

pull davidgumberg wants to merge 2 commits into bitcoin:master from davidgumberg:2026-04-02-notifycan changing 1 files +4 −2
  1. davidgumberg commented at 11:13 PM on April 2, 2026: contributor

    Even though TopUp() notifies, advancing next_index after can deplete available addresses, so make sure to notify any time it's changed.

    This would manifest as users seeing a clickable Receive button in the GUI when in fact no address can be generated in some edge cases.

    This feels like it's begging for:

    1. a refactor to make it impossible to modify next_index or range_end without firing CanGetAddressesChanged
    2. a test

    I banged my head against the keyboard for a bit but I couldn't get either of these to fall out, I also tried massaging a few clankers into doing it but I couldn't get any results that seemed reasonable to me, still seems like a worthwhile fix so opening PR anyway.

    I also included a moveonly commit to pair code that can change the result of CanGetAddresses() with the notification firing

  2. DrahtBot added the label Wallet on Apr 2, 2026
  3. DrahtBot commented at 11:13 PM on April 2, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. wallet: `NotifyCanGetAddressesChanged` when advancing `next_index`
    Even though `TopUp()` notifies, advancing `next_index` after can deplete
    available addresses, so make sure to notify any time it's changed.
    78f9744988
  5. refactor: moveonly: Pair CanGetAddressesChanged notifications with desc range. 88bbce40fe
  6. davidgumberg force-pushed on Apr 2, 2026
  7. DrahtBot added the label CI failed on Apr 3, 2026
  8. DrahtBot removed the label CI failed on Apr 3, 2026
Labels

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 18:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me