Please describe the feature you’d like to see added.
When using the scantxoutset
RPC, the current behaviour is to show the block height of the UTXO. This is not optimal, as block height is ambiguous, especially in the case of a block reorganization happening at the same instant of the query. In this case, an UTXO that does not exist would be assumed to exist, unless the chain’s tip hash is recorded before the scan, and make sure it still exists after, as per this comment by @evanlinjin.
The optimal behaviour should be instead to show block hash:
0~$ bitcoin-cli scantxoutset start "[\"addr(bc1q5q9344vdyjkcgv79ve3tldz4jmx4lf7knmnx6r)\"]"
1{
2 "success": true,
3 "txouts": 185261159,
4 "height": 852742,
5 "bestblock": "000000000000000000004bf6339c59b5c789c8bfd00efc1a4d77d948f1ea328a",
6 "unspents": [
7 {
8 "txid": "fae435084345fe26e464994aebc6544875bca0b897bf4ce52a65901ae28ace92",
9 "vout": 0,
10 "scriptPubKey": "0014a00b1ad58d24ad8433c56662bfb45596cd5fa7d6",
11 "desc": "addr(bc1q5q9344vdyjkcgv79ve3tldz4jmx4lf7knmnx6r)#smk4xmt7",
12 "amount": 0.00091190,
13 "coinbase": false,
14 "height": 852741
15+ "blockhash": 000000000000000000004bf6339c59b5c789c8bfd00efc1a4d77d948f1ea328a
16 }
17 ],
18 "total_amount": 0.00091190
19}
Is your feature related to a problem, if so please describe it.
No response
Describe the solution you’d like
No response
Describe any alternatives you’ve considered
No response
Please leave any additional context
No response