closes #32098
At present, only coinbase UTXOs that have matured by block height h are eligible for coin selection. This pull request extends eligibility to include UTXOs that will mature at block height h+1.
Given that a transaction spending such outputs would be valid and accepted into the mempool, they should be considered for selection.
This approach aligns with the logic implemented by BDK, which appears to be the correct and intended behavior.
0$ bitcoin-cli -regtest createwallet wallet
1{
2 "name": "wallet"
3}
4
5$ export ADDRESS=$(bitcoin-cli -regtest -rpcwallet=wallet getnewaddress)
6
7$ bitcoin-cli -regtest generatetoaddress 101 $ADDRESS
8[
9 "467fd440d0ed89d0cad64fa64d0320968b33a32c681b6c3f5a5ed1d1c016f45a",
10 "1b2246eaa35689710acc5d1bb2923197993233fb9186f0bd561cb546c7667ca7",
11 ...
12 "5d5ee44ada395ab1d978a77596ed3893be750840229e7234a85a01984057798a",
13 "7f8a573a6824edc5342cf86e5e7c0a6ea5664305ef21808456fc98b2621b41cf"
14]
15$ bitcoin-cli -regtest -rpcwallet=wallet getbalance
16- 50.00000000
17+ 100.00000000