[wip] wallet: Add separate balance info for non-mempool wallet txs #33671

pull ajtowns wants to merge 1 commits into bitcoin:master from ajtowns:202510-wallet-unconf-bal changing 7 files +41 −13
  1. ajtowns commented at 4:59 pm on October 21, 2025: contributor

    Changes getbalances to report the balance of outputs for transactions that aren’t confirmed nor in the mempool (eg due to being part of too long a mempool chain, or spending non-standard outputs, or having a datacarrier output that exceeds -datacarriersize, etc)

     0$ bitcoin-cli -regtest getbalances
     1{
     2  "mine": {
     3    "trusted": 5764.96604310,
     4    "untrusted_pending": 0.00000000,
     5    "immature": 3325.00009446,
     6    "nonmempool": 19.99995580
     7  },
     8  "lastprocessedblock": {
     9    "hash": "3c8e45844bc26b66f49f595d1e4b806635424384a7629534e5c4086e00f0e2c6",
    10    "height": 216
    11  }
    12}
    

    Closes #11887

  2. DrahtBot commented at 4:59 pm on October 21, 2025: contributor

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

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33671.

    Reviews

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

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #27865 (wallet: Track no-longer-spendable TXOs separately by achow101)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  3. ajtowns commented at 5:03 pm on October 21, 2025: contributor

    Relevant for #29415 – private relay of our wallet transactions would create spends that weren’t in the mempool and would thus disappear mysteriously from the wallet balance which seems unacceptable. I think I’ve seen similar behaviour when doing lots of consolidations of my signet wallet, which has also been disturbing.

    Perhaps see #11020 for a similar previous attempt.

    This PR currently doesn’t include tests that this works sensibly for nonzero nonmempool balances, hence wip/draft.

  4. glozow added the label Wallet on Oct 22, 2025
  5. wallet: Add separate balance info for non-mempool wallet txs 9d9a0a6d05
  6. ajtowns force-pushed on Oct 22, 2025


ajtowns DrahtBot

Labels
Wallet


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: 2025-10-31 15:13 UTC

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