RPC get free address

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)

Алексей

Posted 2018-09-12T14:54:01.930

Reputation: 103

1Why not just use getnewaddress? The whole account / label system is deprecated and shouldn't be used in new code.Nate Eldredge 2018-09-12T15:00:37.787

Answers

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.

JBaczuk

Posted 2018-09-12T14:54:01.930

Reputation: 6 172