0

If i call the bitcoin-cli importprivkey multiple times, does it import the private key to the same user or to different users? In the bitcoin-cli importprivkey, it does not specify to which user account is the key importing to.

1

You can set account like that

bitcoin-cli importprivkey "myPrivKey" "Account" true

if you want to import multi private keys do it like that

bitcoin-cli importprivkey "myPrivKey" "Account" false
bitcoin-cli importprivkey "myPrivKey" "Account" false
bitcoin-cli importprivkey "myPrivKey" "Account" false
bitcoin-cli importprivkey "myPrivKey" "Account" true

So you don't rescan the entire local block database each time, but the last time.

to import it to default account leave it empty

bitcoin-cli importprivkey "myPrivKey" "" true

Also please consider stopping using accounts since it will be removed in 0.16 version.

  • The 0.16 version will stop using accounts, so how does it manage different users' private keys? – styling Jan 22 '18 at 10:27
  • it's a different question. Please consider ask a new question. – Adam Jan 22 '18 at 10:29

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.