This is a rough draft of what a GetEffectiveBalance function on the wallet might look like, along with RPC call and wallet interface.
Related to #15767
Still todo and open questions:
- RPCHelp wording is just a rough draft and needs amending
- Should the result contain additional info such as: fee rate used, num utxos, num excluded utxos etc. (this would better satisfy #15767 too)
- Should confirm target be configurable? Currently fixed to a 3 blocks.
- In this case the response should likely include the confirm target used to generate the effective value.
- Should this be added to QT wallet? Interface is present. I think it would be nice but don't know much about QT.
- ~Required adding a lot of headers to
receive.cppwhich seems sub-optimal. Perhaps the function belongs somewhere else...~ - Doesn't add a dummy recipient to the tx, so fee calculation is slightly off
- ~Doesn't respect
avoid_reuse~ - Doesn't respect
watch_only - RBF just uses wallet default