Closes #32098.
Currently, only coinbase UTXOs that are mature at height h are available for coin selection. This PR makes UTXOs that mature at height h+1 available for selection.
Since a transaction spending this output will be accepted by the mempool, it should be available for selection.
BDK implements this logic<sup>1</sup>, which I believe to be the correct one.
$ bitcoin-cli -regtest createwallet wallet
{
"name": "wallet"
}
$ export ADDRESS=$(bitcoin-cli -regtest -rpcwallet=wallet getnewaddress)
$ bitcoin-cli -regtest generatetoaddress 101 $ADDRESS
[
"467fd440d0ed89d0cad64fa64d0320968b33a32c681b6c3f5a5ed1d1c016f45a",
"1b2246eaa35689710acc5d1bb2923197993233fb9186f0bd561cb546c7667ca7",
...
"5d5ee44ada395ab1d978a77596ed3893be750840229e7234a85a01984057798a",
"7f8a573a6824edc5342cf86e5e7c0a6ea5664305ef21808456fc98b2621b41cf"
]
$ bitcoin-cli -regtest -rpcwallet=wallet getbalance
- 50.00000000
+ 100.00000000