Suppose i have 10 accounts of user and want to send bitcoin from account 3 to account 5 user. Now what method should I use?
- snip -
Do not use the "account" system in Bitcoin Core. It is deprecated and generally does not work the way the average user assumes. You will cause yourself confusion and probably create a system that doesn't work well. The "account" system in Bitcoin Core WILL be going away in a future release.
Instead, create your own database to keep track of accounts. In that case, you can just reduce the balance for user 3 in your database and increase the balance for user 5 in your database. You won't need to use RPC method at all.
If you really want to use Bitcoin Core as an account system (This is a very bad idea!), then you need to decide if you just want the "Account" in Bitcoin Core to be updated without actually moving any bitcoins, or if you want to actually send the bitcoins to a new address.
If you just want to update the "account" and not actually move the bitcoins to the new address, then you can use the following command:
If you want to actually send bitcoins to a new address, then you can use the following command:
Please be aware that Bitcoin Core WILL ALLOW AN ACCOUNT TO HAVE A NEGATIVE BALANCE.
Please be aware that Bitcoin Core WILL USE BITCOINS THAT WERE RECEIVED AT ONE ACCOUNT TO SEND FROM A DIFFERENT ACCOUNT.