4

According the the Bitcoin Wiki, when importing a private key:

Bitcoind will rescan the entire block data to ensure this key has not been used before. This process will take from one to two minutes, depending on your CPU performance. DO NOT abort it before finishing!

Why is this scanning necessary? Wouldn't this prevent me from changing from one bitcoin client to another, because that would involve importing (used) private keys from the old client into the new?

3

It is usually longer than 2 minutes...
Please look at the blockchain as a database storing addresses and balances.
If you have an address (privkey) from the very beginning, you search in the blockchain for records about your address.
But if you import address, which was unknown to this client, you have to go through blockchain once again, in order to search for records corresponding to this address. Elsewhere, how could you know balance of this address, if you didn't look at it before importing?
In my opinion, it doesn't prevent you from importing anything.
If you want to skip rescan, use bitcoind importprivkey l12n3lj2nl2n3213lkj4n3lk4n false. You can import a lot of privkeys this way, and rescan at the end with the last address or via start switch bitcoind -rescan.
Please note that rescaning is not necessary when importing keys with 0 BTC.

  • 1
    If you are correct ("it doesn't prevent you from importing anything") then the Bitcoin Wiki should be corrected. – RentFree Aug 15 '13 at 18:45
  • Yeah sounds like the reason is not correct according to this answer. Although if you click over to the wiki, there is an optional new_key parameter. It's ambiguous as to whether the author meant it was checking to see of the new key was already used, which makes more sense. – Neil Neyman Aug 15 '13 at 23:49
  • @NeilNeyman You are absolutely right. I suppose it was written by a non-native English speaker, because such context in many European languages means what I mentioned in my post. – ripazha Aug 16 '13 at 8:30

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.