Can the change address be in a different account after using sendfrom <fromaccount>?

1

I made a sendfrom call specifying the fromaccount parameter. The resulting transaction created a change address which was not assigned to the account I specified. The address was not assigned to any account.

Why do you think this might have happened?

Also, do you think I can spend the amount on the change address by sending using sendfrom by specifying the same account?

Emre Kenci

Posted 2014-01-08T19:41:56.040

Reputation: 3 008

Answers

1

You misunderstand how accounts work.

All coins in a wallet are always shared between all accounts. When creating a new transaction, the coins are taken from the entire set a wallet has access to - independent from how these were obtained.

Accounts are just bean counters - virtual balances. When a transaction is received that spends to address X, and address X has label L in your wallet, account L is credited with this receive. If you use sendmany or sendfrom and specify a from account, that accounts' balance is decreased by the amount of value that leaves your wallet through that transaction.

Change does not exist in this high level view. It is not money that is entering or leaving your wallet, and thus cannot affect any balance.

Accounts are a confusing feature, its use cases are limited, and have several implementation problem. In many cases, people assume they behave as independent wallets, which is not the case. They may be removed in some later version.

Pieter Wuille

Posted 2014-01-08T19:41:56.040

Reputation: 54 032

Thanks! In light of your explanation, I seriously don't get why they exist.Emre Kenci 2014-01-10T07:22:09.740