Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: JohnnyCashout on September 19, 2011, 07:00:31 PM



Title: question about backing up wallet.dat and then making new receive addresses
Post by: JohnnyCashout on September 19, 2011, 07:00:31 PM
Lets say I have 90 bitcoins, and I make a backup of my wallet.dat

then I manually make 10 new receive addresses in my wallet by going to address book->receiving-> new address and receive 1 bitcoin each to each of those addresses, now I have 100 bitcoins.

Now lets say I lose my wallet.dat due to hard drive crash.  If I restore my backed-up wallet, will I have 90 or 100 bitcoins? 


Title: Re: question about backing up wallet.dat and then making new receive addresses
Post by: Revalin on September 19, 2011, 07:10:53 PM
You will have 100.

Bitcoin pre-generates addresses for your next 100 transactions (Either new addresses as you describe, or automatically generated ones for the "change" when you spend), and stores them in the "key pool".  As long as you back up your wallet before you use them up, you're safe.  You can also set it to use a larger key pool if you go through a lot of addresses and can't back up frequently enough.

More info here: https://en.bitcoin.it/wiki/Securing_your_wallet


Title: Re: question about backing up wallet.dat and then making new receive addresses
Post by: JohnnyCashout on September 19, 2011, 07:45:48 PM
You will have 100.

Bitcoin pre-generates addresses for your next 100 transactions (Either new addresses as you describe, or automatically generated ones for the "change" when you spend), and stores them in the "key pool".  As long as you back up your wallet before you use them up, you're safe.  You can also set it to use a larger key pool if you go through a lot of addresses and can't back up frequently enough.

More info here: https://en.bitcoin.it/wiki/Securing_your_wallet

cool, thanks.  I knew it pre-generated addresses but I didn't know that manually creating one also comes from the same pre-generated key-pool (I Thought the key-pool was just for 'change' transactions), that’s what I was worried about.