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.
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
-