Author

Topic: "listaccounts" and "labels" : why is it this way ? (Read 630 times)

member
Activity: 70
Merit: 10
accounts & labels are the same,  

basically when you call listaccounts call it will show you accounts as key and balance as value ( it's quite usefull when you have multiple addresses pointed an account(label)


i think getaccountaddress call is what you are looking for .

PS: btc supports rpc2.0  this makes your life easier.

I tried getaccountaddress and found stange results, it sometimes generates a new address with the same label as the argument !! How does that work ?

Also any link as to how and what advantages rpc2.0 has when used with btc ?
Oh, i made a mistake.  your call should be getaddressesbyaccount not getaccountaddress (this actually returns only address)

about rpc2.0 http://www.jsonrpc.org/specification#examples

I'm sorry for the mistake.
full member
Activity: 128
Merit: 101
Accounts surely are a sum of addresses. So, what you've described makes sense.

If you want a list by addresseses then try
 listreceivedbyaddress 0 true
which, if I've remembered that correctly, will list all addresses even with zero balance and their label.

List by account then, from what you've described, groups by label =='account'.

Hmm that helped clear some doubts. Thanks.
full member
Activity: 128
Merit: 101
accounts & labels are the same, 

basically when you call listaccounts call it will show you accounts as key and balance as value ( it's quite usefull when you have multiple addresses pointed an account(label)


i think getaccountaddress call is what you are looking for .

PS: btc supports rpc2.0  this makes your life easier.

I tried getaccountaddress and found stange results, it sometimes generates a new address with the same label as the argument !! How does that work ?

Also any link as to how and what advantages rpc2.0 has when used with btc ?
sr. member
Activity: 531
Merit: 260
Vires in Numeris
I tried to make a new address and have the same label for two addresses. When I typed "listaccounts" it showed me only the label which was the same for both addresses.

When I change the label to something else then all the addresses according to labels are listed.

Why does listaccounts show according to labels ? I mean to ask what is the logic behind it. Wouldnt showing by addresses be more meaningful ?


Accounts surely are a sum of addresses. So, what you've described makes sense.

If you want a list by addresseses then try
 listreceivedbyaddress 0 true
which, if I've remembered that correctly, will list all addresses even with zero balance and their label.

List by account then, from what you've described, groups by label =='account'.
member
Activity: 70
Merit: 10
accounts & labels are the same,  

basically when you call listaccounts call it will show you accounts as key and balance as value ( it's quite usefull when you have multiple addresses pointed an account(label)


i think getaccountaddress getaddressesbyaccount call is what you are looking for .

PS: btc supports rpc2.0  this makes your life easier.


full member
Activity: 128
Merit: 101
I tried to make a new address and have the same label for two addresses. When I typed "listaccounts" it showed me only the label which was the same for both addresses.

When I change the label to something else then all the addresses according to labels are listed.

Why does listaccounts show according to labels ? I mean to ask what is the logic behind it. Wouldnt showing by addresses be more meaningful ?
Jump to: