Author

Topic: Empty output from listunspent with a trusted balance? (Read 123 times)

member
Activity: 74
Merit: 21
I can't reproduce this in RegTest, Bitcoin Core v27.0

Steps done are: Create a descriptor wallet with default args -> receive BTC -> generate coins (using another wallet) it until it has 6 confirmations.
getbalances shows it under "trusted" balance.
listunspent command shows the UTXO.
It's working as intended.

The only way it happens at my end is when I purposely lock that specific unspent transaction output with lockunspent command.
Can you try listlockunspent?

Thanks!
It does shows up under listlockunspent. I did not use the command lockunspent directly myself though, but a tool I was using might have I guess... Will do more testing. Would be useful if the lock information was shown by the getbalances and getaddressinfo commands maybe.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
I can't reproduce this in RegTest, Bitcoin Core v27.0

Steps done are: Create a descriptor wallet with default args -> receive BTC -> generate coins (using another wallet) it until it has 6 confirmations.
getbalances shows it under "trusted" balance.
listunspent command shows the UTXO.
It's working as intended.

The only way it happens at my end is when I purposely lock that specific unspent transaction output with lockunspent command.
Can you try listlockunspent?
member
Activity: 74
Merit: 21
Hi,

So I have this descriptor core wallet I created with default options, then I obtained an address with getnewaddress. I transferred coins to the address and waited over 6 confirmations. I see a trusted balance in the wallet, I see the address as belonging to the wallet with getaddressinfo, but listunspent returns an empty list. What is going on? Thanks!

Code:
./bin/bitcoin-cli -datadir=./var_testnet -rpccookiefile=./testnet3/.cookie -conf=../etc/bitcoin_testnet.conf -rpcport=18332 -rpcwallet=send getbalances
{
  "mine": {
    "trusted": 0.008*****,
    "untrusted_pending": 0.00000000,
    "immature": 0.00000000
  },
  ...
}

Code:
./bin/bitcoin-cli -datadir=./var_testnet -rpccookiefile=./testnet3/.cookie -conf=../etc/bitcoin_testnet.conf -rpcport=18332 -rpcwallet=send getaddressinfo tb1******************************************  {
  "address": "tb1*****************************************",
  "scriptPubKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "ismine": true,
  "solvable": true,
  "desc": "wpkh([xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "parent_desc": "wpkh([xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/0/*)#xxxxxxxxxxxxxx",
  "iswatchonly": false,
  "isscript": false,
  "iswitness": true,
  "witness_version": 0,
  "witness_program": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "pubkey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "ischange": false,
  "timestamp": 1716000000,
  "hdkeypath": "m/84h/1h/0h/0/0",
  "hdseedid": "0000000000000000000000000000000000000000",
  "hdmasterfingerprint": "xxxxxxxx",
  "labels": [
    ""
  ]
}

Code:
./bin/bitcoin-cli -datadir=./var_testnet -rpccookiefile=./testnet3/.cookie -conf=../etc/bitcoin_testnet.conf -rpcport=18332 -rpcwallet=send listunspent 0
[
]
Jump to: