0

Always when i need free address (not labled) i use:

getAccountAddress('')

And i want to know: Can it give me an already occupied address (by label)

I'm worried that I can get an already address in using (by label)

  • 1
    Why not just use getnewaddress? The whole account / label system is deprecated and shouldn't be used in new code. – Nate Eldredge Sep 12 '18 at 15:00
1

If you provide an empty string it will return the default account every time. Note getaccountaddress is deprecated, see https://bitcoincore.org/en/doc/0.16.2/rpc/wallet/getaccountaddress/.

getaccountaddress "account"

DEPRECATED. Returns the current Bitcoin address for receiving payments to this account.

Arguments:
1. "account"       (string, required) The account name for the address. It can also 
be set to the empty string "" to represent the default account. The account does not
need to exist, it will be created and a new address created  if there is no account
by the given name.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.