Author

Topic: Difference in getbalance and total sum of listunspent (Read 92 times)

newbie
Activity: 2
Merit: 1
I don't see where they are not the same. All of the amounts sum to the same value. Your wallet appears to have enabled the avoid_reuse flag, so the values in UTXOs for scripts that have already been used before will be counted in the "used" balance separately from "trusted".


Is there any real potential benefits for settings avoid_reuse as False. And thanks for the explanation. I did some calculations and yeah, it matches.
legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
-snip-    "used": 0.00021342
"used" doesn't mean that those are spent, it only means (in layman terms) that you've received bitcoins through an addresses, spent it and then received coins through that address again.
In case you unintentionally enabled the flag, you can disable it with:
Code:
bitcoin-cli setwalletflag "avoid_reuse" false


On a side note, accumulating more UTXOs with small amounts like those could end up causing you to pay high txn fee if you need to spend hundreds of them in one transaction.
If those are mining pool payments, I'd consider setting a higher minimum payment amount.
staff
Activity: 3458
Merit: 6793
Just writing some code
I don't see where they are not the same. All of the amounts sum to the same value. Your wallet appears to have enabled the avoid_reuse flag, so the values in UTXOs for scripts that have already been used before will be counted in the "used" balance separately from "trusted".
newbie
Activity: 2
Merit: 1

Bitcoin Core Version: bitcoin-core-24.-
Wallet version : 169900
Operating System: Ubuntu 22.04 64-bit
System Hardware Specs: N/A
Description of Problem: is there a reason why the total sum of listunspent and getbalances are not the same
Any Related Addresses: N/A
Any Related Transaction IDs: N/A
Screenshot of the problem: N/A
Log Files from the Bitcoin Client: N/A




bitcoin-cli listunspent | grep amount
    "amount": 0.00002129,
    "amount": 0.00002129,
    "amount": 0.00004280,
    "amount": 0.00002756,
    "amount": 0.00004278,
    "amount": 0.00004263,
    "amount": 0.00004263,


bitcoin-cli getbalances
{
  "mine": {
    "trusted": 0.00002756,
    "untrusted_pending": 0.00000000,
    "immature": 0.00000000,
    "used": 0.00021342
  }
}
Jump to: