Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: djpnewton on August 30, 2011, 03:35:38 AM



Title: getaccountaddress (why does it often create a new address for the account?)
Post by: djpnewton on August 30, 2011, 03:35:38 AM
I understand the command creates a new address if the account does not previously exist but it seems to randomly create a new address even if the account has addresses already.

Also I have one account where the result from 'getaccountaddress' is not in the list returned by 'getaddressesfromaccount'.. has anyone seen this before?


Title: Re: getaccountaddress (why does it often create a new address for the account?)
Post by: theymos on August 30, 2011, 03:37:38 AM
It returns a new address whenever the old address has a non-zero balance. This is intentional.


Title: Re: getaccountaddress (why does it often create a new address for the account?)
Post by: djpnewton on August 30, 2011, 06:06:39 AM
Ok, I see that it is documented here https://en.bitcoin.it/wiki/Accounts_explained#Accounts_and_Receiving_Addresses

Do you know what the rationale is?


Title: Re: getaccountaddress (why does it often create a new address for the account?)
Post by: theymos on August 30, 2011, 06:11:13 AM
It improves the anonymity of both you and the sender.


Title: Re: getaccountaddress (why does it often create a new address for the account?)
Post by: djpnewton on August 30, 2011, 07:18:07 AM
ok.. thank-you


Title: Re: getaccountaddress (why does it often create a new address for the account?)
Post by: Sekioh on September 08, 2011, 12:39:11 PM
There's also a difference of that it's not creating a new address as much as it is revealing it. I believe I read that it automatically allocates a block of like 100 addresses into your wallet when creating it?

In any case, I have only like 8 addresses listed because I do a few transactions on the old ones and it doesn't make new ones unless that newest one gets anything sent to it. I have one for mining, one for personal, one for bonuses, one for donations, and a few for other uses, and pools only use the mining one, so most payments are in categories like that, doesn't touch new addresses ever for me. ;D


Title: Re: getaccountaddress (why does it often create a new address for the account?)
Post by: theymos on September 08, 2011, 07:47:13 PM
There's also a difference of that it's not creating a new address as much as it is revealing it. I believe I read that it automatically allocates a block of like 100 addresses into your wallet when creating it?

Everything draws from the keypool, not just getaccountaddress.