I recently needed to import some private keys into my wallet.
I knew the addresses had never been used, and so didn't need to rescan the blockchain, but there's no way to import a private key without the client automatically rescanning the whole blockchain.
There's also no way to import multiple private keys at once, so to import 5 private keys I had to wait while the client scanned the whole blockchain 5 times over for transactions I knew it wouldn't find anyway.
I'd like to be able to either:
- import multiple keys with a single importprivkey RPC call, or
- optionally suppress the blockchain rescan
Or both.
I ended up commenting these two lines in rpcdump.cpp to get the job done:
// pwalletMain->ScanForWalletTransactions(pindexGenesisBlock, true);
// pwalletMain->ReacceptWalletTransactions();
but would prefer a better solution.