1

I have account in bitcoin-core (for example it's "maks") and there I have 0.00010884 BTC.

getbalance "maks"
0.00010884

But when I get UTXO:

listunspent 1 999999 [...array of addresses belongs to "maks" account...]

and sum all amounts up I get 0.00009824 BTC and I don't understand WHY?? I thought account balance is sum all unspent transactions outputs. Please help me! Or maybe it's don't need me... I want to create raw transactions and for this I need unspent transactions. How I can get these transactions?

3

Accounts have nothing to do with UTXOs.

They are bean counters to help you determine who owns how much, in case you have multiple users sharing the same wallet.

An account is credited whenever a payment arrives to an address associated with that account. It is debited whenever the sendfrom or sendmany RPC is used while specifying that account. If you use any other means of sending, the "" account will be debited.

However, the UTXOs are always shared across all accounts in a wallet, and don't belong to a specific account. When you send out money, all UTXOs are always considered. Accounts can go negative even, if you use the move command (which just increments one account and decrements another).

The above is one of the reasons why the accounts system is deprecated, as it does not match people's expectations. If you want to have actually separated users, with independent UTXOs and balances, you should look at the multi-wallet feature added in 0.15.0.

  • Do you want to say that bitcoin-core is a bad idea for creating a bitcoin-purse? – xmaks Oct 19 '17 at 5:56
  • I have no idea how you read that in my answer. All I'm saying is that you've very much misunderstood what accounts in Bitcoin Core are designed to do. I've added a line about multi-wallet support, which may be more what you're after. – Pieter Wuille Oct 19 '17 at 6:11
  • Sorry! I meant creating multi-wallet. where each user can use just his UTXOs – xmaks Oct 19 '17 at 6:20
0

bitcoin-core accounting system is not perfect. as far as i know the developers do not support it anymore

I want to create raw transactions and for this I need unspent transactions.

are you sure that you want to do this hard work for 0.00010884 btc? :)

How I can get these transactions?

  • create a dump of your wallet
  • look through all addresses on some block explorer
  • write down the unspent outputs
  • bitcoin-core accounting system is not perfect - As far as I know, a new version 15 has been released recently. It's just balance for testing :) So why account balance and the sum of UTXO are not equal? – xmaks Oct 18 '17 at 14:09
  • 1
    You're right that the accounting system is deprecated and will be removed, but that has nothing to do with this question. The answer is the UTXOs have never had anything to do with accounts. – Pieter Wuille Oct 18 '17 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.