Bitcoin Forum

Other => Beginners & Help => Topic started by: crazylikeafox on November 19, 2012, 03:54:48 PM



Title: Fastest way to Import Private Keys?
Post by: crazylikeafox on November 19, 2012, 03:54:48 PM
As suggested in the BitCoin Merchant HowTo, I'm playing around with pre-generating several thousand bitcoin addresses.  The problem seems to be importing them.  Even PyWallet only lets you import them into your wallet.dat one at a time.  Is there a decent solution for this?


Title: Re: Fastest way to Import Private Keys?
Post by: DeathAndTaxes on November 19, 2012, 04:04:07 PM
Why import them?  Simply set the keypool to a large number (say 2000) and bitcoind will produce them internally. 
You can then bulk export the addresses or just grab a new one in realtime using bitcoind "getnewaddress".

I know it doesn't answer your direct question but it likely is a lot more efficient doing it this way.


Title: Re: Fastest way to Import Private Keys?
Post by: crazylikeafox on November 19, 2012, 04:50:59 PM
Why import them?  Simply set the keypool to a large number (say 2000) and bitcoind will produce them internally. 
You can then bulk export the addresses or just grab a new one in realtime using bitcoind "getnewaddress".

I know it doesn't answer your direct question but it likely is a lot more efficient doing it this way.

OK, that sounds reasonable.  So my understanding is that the keypool is essentially a group of addresses that have been generated by your client but aren't displayed to you in the "receive coins" interface (until you request a new address).  If I export these addresses, and people send coins to some of them, will they be included in my balance on the client even though they aren't displayed in the "receive coins" interface?


Title: Re: Fastest way to Import Private Keys?
Post by: DeathAndTaxes on November 19, 2012, 05:16:54 PM
I have have never used it that way so you should probably test it.  Just use pywallet or a tool like that to grab a key from the keypool which hasn't been "used".  Send funds to it and see if the wallet detects it.  I would be surprised if keypool addresses aren't checked for balance/transactions though.  It would cause all kinds of "weirdness" when an old backup is used if it didn't.