15
7
Suppose that my wallet is encrypted with a passphase and currently I have not provided bitcoind with the passphrase to access the private keys section of the wallet.
If I enter:
bitcoind getnewaddress
It prints a new address, say [someaddress], but where does it store the private key that goes with it?
If I enter:
bitcoind dumpprivkey [someaddress]
I get an error message since I have not provided the wallet passphrase.
But if I first provide the wallet passphrase and then try dumpprivkey it shows the private key.
When I asked it to get a new address, I had not provided the passphrase, so how it store the private key?
Where does the key pool track that the key is being used if the wallet is locked? What if bitcoind is restarted? http://bitcoin.stackexchange.com/q/5800/1878
– goodguys_activate – 2012-12-16T05:10:48.8071Each 'getnewaddress' takes an address from the keypool. Being 'locked' simply means that the passphrase used to encrypt the private key of each address is unavailable. This prevents new addresses from being created (since the passphrase is required to encrypt the new private key) and existing addresses from having their contents spend (since the passphrase is required to decrypt their private key). The wallet isn't locked in the sense of being unmodifiable, and so addresses can be marked as no longer being in the keypool. – Chris Moore – 2012-12-16T19:06:00.407