user13333: I have just started mining and in another question of mine it came up, that there can be multiple private keys in a wallet because of defining a backup strategy.
I would like to understand when private keys are created in the wallet?
If it is specific of the coin / wallet, I am refering to dogecoin wallet application with currently 1 address created in it.

user12034: In the default Bitcoin client, and most clients based on it (including Dogecoin-QT), 100 private keys are pre-generated, so that the wallet you backup is useful both for existing and some future transactions (roughly 50 transactions, assuming you receive on a new address and send change to a new address each time). When you ask the client to generate an address for you, it pulls from a private key from this pool (and generates another to put the pool back up to 100 at some point), from which a public key and address can be calculated. This pool size is configurable in your .conf file:
 # Pre-generate this many public/private key pairs, so wallet backups will be valid for
 # both prior transactions and several dozen future transactions.
 #keypool=100


13333: <p>I have just started mining and in another question of mine it came up, that there can be multiple private keys in a wallet because of defining a backup strategy.</p>

<p>I would like to understand when private keys are created in the wallet?
If it is specific of the coin / wallet, I am refering to dogecoin wallet application with currently 1 address created in it.</p>
 12034: <p>In the default Bitcoin client, and most clients based on it (<a href="https://github.com/dogecoin/dogecoin/blob/87c59cadb1953f88a680e656bce334ed39b44a49/src/wallet.cpp" rel="nofollow">including Dogecoin-QT</a>), 100 private <a href="https://en.bitcoin.it/wiki/Running_Bitcoin#Bitcoin.conf_Configuration_File" rel="nofollow">keys are pre-generated</a>, so that the wallet you backup is useful both for existing and some future transactions (roughly 50 transactions, assuming you receive on a new address and send change to a new address each time). When you ask the client to generate an address for you, it pulls from a private key from this pool (and generates another to put the pool back up to 100 at some point), from which a public key and address can be calculated. This pool size is configurable in your .conf file:</p>

<pre><code> # Pre-generate this many public/private key pairs, so wallet backups will be valid for
 # both prior transactions and several dozen future transactions.
 #keypool=100
</code></pre>
