spendable is true for UTXO of private key disabled wallet #33110

issue sagarkarki99 openend this issue on August 1, 2025
  1. sagarkarki99 commented at 8:26 am on August 1, 2025: none

    I have a private key disabled descriptors wallet which I use to watch transactions. Upon fetchings the UTXOs using listunspent, the spendable is true. Documentations says: "spendable" : true|false, (boolean) Whether we have the private keys to spend this output. Shouldn’t the spendable be false for this case, as it belongs to wallet where there is no private keys? here is wallet info:

     0➜  Bitcoin bcr -rpcwallet=external_wallet getwalletinfo                    
     1{
     2  "walletname": "external_wallet",
     3  "walletversion": 169900,
     4  "format": "sqlite",
     5  "balance": 0.40000000,
     6  "unconfirmed_balance": 0.00000000,
     7  "immature_balance": 0.00000000,
     8  "txcount": 2,
     9  "keypoolsize": 0,
    10  "keypoolsize_hd_internal": 0,
    11  "paytxfee": 0.00000000,
    12  "private_keys_enabled": false,
    13  "avoid_reuse": false,
    14  "scanning": false,
    15  "descriptors": true,
    16  "external_signer": false,
    17  "blank": false,
    18  "birthtime": 1753968753,
    19  "lastprocessedblock": {
    20    "hash": "5970828895b15604c4cea51a14a41b133a47df184c409c90a39bc642ee4bc432",
    21    "height": 1508
    22  }
    23}
    

    Here is the UTXOs:

     0➜  Bitcoin bcr -rpcwallet=external_wallet listunspent                      
     1[
     2  {
     3    "txid": "8f1f2ba7d445629d8d7390c0f364b49079b3ad3b759771a11483f67254650c9c",
     4    "vout": 0,
     5    "address": "mqM7vzxMtjQAeECdEkKyY1ucAtd1QiVYaZ",
     6    "label": "",
     7    "scriptPubKey": "76a9146bd5248d652a8600a6031b2b4c0f8e7a93ee662b88ac",
     8    "amount": 0.30000000,
     9    "confirmations": 1,
    10    "spendable": true,
    11    "solvable": true,
    12    "desc": "pkh([6bd5248d]04089246add2fd7e2edf9b137e3b3e3b894fc9fc8d0697884fcad30be0ad578c4ccb7c2614f0a72df69298bc6e1e003b0f684676dd6f6a4168d41975221a8aaa5b)#edkkr0h5",
    13    "parent_descs": [
    14      "pkh(04089246add2fd7e2edf9b137e3b3e3b894fc9fc8d0697884fcad30be0ad578c4ccb7c2614f0a72df69298bc6e1e003b0f684676dd6f6a4168d41975221a8aaa5b)#gsvkgg0f"
    15    ],
    16    "safe": true
    17  },
    18  {
    19    "txid": "8f52bd309b79cda01e0eb75e37f154dc1acad7478a0b95cb3d598b3c6c7d0a38",
    20    "vout": 0,
    21    "address": "mqM7vzxMtjQAeECdEkKyY1ucAtd1QiVYaZ",
    22    "label": "",
    23    "scriptPubKey": "76a9146bd5248d652a8600a6031b2b4c0f8e7a93ee662b88ac",
    24    "amount": 0.10000000,
    25    "confirmations": 205,
    26    "spendable": true,
    27    "solvable": true,
    28    "desc": "pkh([6bd5248d]04089246add2fd7e2edf9b137e3b3e3b894fc9fc8d0697884fcad30be0ad578c4ccb7c2614f0a72df69298bc6e1e003b0f684676dd6f6a4168d41975221a8aaa5b)#edkkr0h5",
    29    "parent_descs": [
    30      "pkh(04089246add2fd7e2edf9b137e3b3e3b894fc9fc8d0697884fcad30be0ad578c4ccb7c2614f0a72df69298bc6e1e003b0f684676dd6f6a4168d41975221a8aaa5b)#gsvkgg0f"
    31    ],
    32    "safe": true
    33  }
    34]
    
  2. sagarkarki99 renamed this:
    spendable is true for UTXO of private key disabled UTXO
    spendable is true for UTXO of private key disabled wallet
    on Aug 1, 2025
  3. achow101 commented at 7:02 pm on August 1, 2025: member
    The docs need to be updated, spendable is always true for UTXOs belonging to a descriptor wallet, including ones without private keys.
  4. w0xlt commented at 6:03 pm on August 7, 2025: contributor
    Considering that the legacy wallet can no longer be loaded, will this field always be true?
  5. sagarkarki99 commented at 5:02 pm on August 9, 2025: none
    Then the field is deprecated as commented by @w0xlt here. Thanks @achow101

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-08-09 18:13 UTC

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