Importprivkey's "label" - is it the same as an account?

9

2

The "importprivkey" API call allows one to import a private key and save it with a label. Is the "label" in the API call synonymous with an account used in the wallet?

ThePiachu

Posted 2012-07-08T21:44:04.790

Reputation: 41 594

Answers

7

Though the terminiology is unclear, in code "label" and "account" are the same thing:

importprivkey function (src/rpcdump.cpp):

pwalletMain->SetAddressBookName(vchAddress, strLabel);

from getnewaddress function (src/rpcwallet.cpp):

pwalletMain->SetAddressBookName(keyID, strAccount);

aland

Posted 2012-07-08T21:44:04.790

Reputation: 1 338