Bitcoin Forum
July 08, 2024, 09:40:51 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin Client Balance  (Read 1424 times)
Arsenal (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
May 02, 2011, 06:19:48 AM
 #1

I've been using BTCs for a while now, but I have one question that is always making me paranoid about whether I actually have as many as the client says I have.

Let's say I have a wallet.dat with 10 BTC.  I then exit the client, copy the wallet.dat file, encrypt it, and store it somewhere.
I go back into the client that is still using that same wallet.dat with 10BTC and I send out 5BTC to a friend's wallet.
Now if I replace that wallet.dat file with the encrypted one (after its been decrypted) what will the balance that is shown in the client say?

Will it say 10BTC and someday I'll try to send more than 5BTC out and I'll suddenly discover that I don't have as many BTC as I thought I did?
-or-
Will it say 10BTC, but update once the client downloads the block-chain and correctly show that its balance is 5BTC?
koin
Legendary
*
Offline Offline

Activity: 873
Merit: 1000


View Profile
May 02, 2011, 07:32:52 AM
 #2

I go back into the client that is still using that same wallet.dat with 10BTC and I send out 5BTC to a friend's wallet.
Now if I replace that wallet.dat file with the encrypted one (after its been decrypted) what will the balance that is shown in the client say?

if you restore it properly (either download the block chain again, or -rescan) the client will show either 5 btc or a lesser number -- even 0 btc is possible.

why might it show 0? it depends on whether or not at the time you made your backup that in the key pool at the time was the address that your client ended up using as a change transaction when you spent the 5 btc.

because the key pool holds 100 addresses, if the only transaction was the 5 btc spend or there were under 100 new addresses needed, then your restore will have all your bitcoins and will show the correct amount.

 http://en.bitcoin.it/wiki/Address
 http://en.bitcoin.it/wiki/Securing_your_wallet
 
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!