Bitcoin Forum
September 12, 2024, 03:23:04 PM *
News: Latest Bitcoin Core release: 27.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Empty output from listunspent with a trusted balance?  (Read 105 times)
Jodmapht (OP)
Member
**
Offline Offline

Activity: 70
Merit: 21


View Profile
May 30, 2024, 02:11:38 AM
 #1

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
[
]
nc50lc
Legendary
*
Offline Offline

Activity: 2534
Merit: 6080


Self-proclaimed Genius


View Profile
May 30, 2024, 12:41:53 PM
Merited by Jodmapht (1)
 #2

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?

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Jodmapht (OP)
Member
**
Offline Offline

Activity: 70
Merit: 21


View Profile
May 30, 2024, 10:23:35 PM
 #3

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.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!