• Forum has been upgraded, all links, images, etc are as they were. Please see Official Announcements for more information

Trying to understand "accounts" in dash-cli

jimbursch

Well-known member
I'm working on getting familiar with dash-cli on the command line and I have a pretty basic question(s).

I understand addresses, but I'm not clear on what are "accounts". Here is what I'm looking at and don't understand:

$ ./dash-cli getaddressesbyaccount ""
[
"XdKNPvjvAVN3eLdqx4k1jKyJ5HSYSuXr5Y",
"Xg15zFBxyQt5Bqk7PP28HrfuEQ6NJrx2nt",
"XvTuFvFfo8aUUsMT1VHECKK3BH9Y85gRSR"
]
$ ./dash-cli listaccounts
{
"": 0.00000000,
"Xg15zFBxyQt5Bqk7PP28HrfuEQ6NJrx2nt": 0.00000000
}


Xg15... is an address that I created with getnewaddress.

What are "accounts"?

My understanding is that getaddressesbyaccount "" returns all addresses in my wallet. Why does the address I created appear in listaccounts?
 
Accounts was a result of an attempt in Bitcoin Core to organize funds accounting in some internal DB in a "traditional" way afaik. Turned out it was not a very good idea which caused a lot of confusion and thus this functionality is considered deprecated now. RE listaccounts issue: this is indeed is not the way it should work... but I can't reproduce your issue either..
 
Back
Top