9

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
  • 42,931
  • 25
  • 138
  • 347

1 Answers1

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
  • 1,388
  • 8
  • 18