Bitcoin Forum
November 12, 2024, 01:50:58 PM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How bitcoins are spent from different addresses, official bitcoin client  (Read 1098 times)
stepkrav (OP)
Full Member
***
Offline Offline

Activity: 188
Merit: 100



View Profile
August 26, 2012, 02:21:58 PM
 #1

Hello there. I'm using the official bitcoin client and i have a question.

Say i have 1 btc in address A and 2 btc in address B, in my wallet.
Then i want to make a payment of 2 btc to a friend of mine.

Will the client take the 2 btc in address B, and spend them? Is it possible to take 1 btc from both address A and B?

Thanks!

ps : hope this is the appropriate board for my question. if not, moderators please take care.
Strider Hiryu
Newbie
*
Offline Offline

Activity: 29
Merit: 0



View Profile
August 26, 2012, 02:26:32 PM
 #2

While in that case it probably will, you can't really rely on it.  It's some behind the scenes black magic.
Revalin
Hero Member
*****
Offline Offline

Activity: 728
Merit: 500


165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g


View Profile
August 26, 2012, 02:30:25 PM
 #3

It uses the oldest and smallest coins available.  There is no way to select specific coins in the standard client, but you can with the coderr patch:
http://coderrr.wordpress.com/2011/06/30/patching-the-bitcoin-client-to-make-it-more-anonymous/

      War is God's way of teaching Americans geography.  --Ambrose Bierce
Bitcoin is the Devil's way of teaching geeks economics.  --Revalin 165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g
bitcats
Legendary
*
Offline Offline

Activity: 1014
Merit: 1001



View Profile
August 26, 2012, 03:03:26 PM
 #4

You can do it with electrum.

"Unser Problem ist nicht ziviler Ungehorsam, unser Problem ist ziviler Gehorsam."  - Howard Zinn
stepkrav (OP)
Full Member
***
Offline Offline

Activity: 188
Merit: 100



View Profile
August 26, 2012, 03:43:09 PM
 #5

You can do it with electrum.

is it easy to transfer my keys from one client to another ?
bitcats
Legendary
*
Offline Offline

Activity: 1014
Merit: 1001



View Profile
August 26, 2012, 04:57:59 PM
 #6

You can do it with electrum.

is it easy to transfer my keys from one client to another ?
Yes it is quite easy. You dont need to transfer the keys, you just import your private keys into the electrum wallet. You can have the same keys in different clients/wallets.
http://dre.redmartian.org/elecwin.htm
Of course you should read the "howto" first.

"Unser Problem ist nicht ziviler Ungehorsam, unser Problem ist ziviler Gehorsam."  - Howard Zinn
Pieter Wuille
Legendary
*
Offline Offline

Activity: 1072
Merit: 1181


View Profile WWW
August 26, 2012, 07:47:53 PM
 #7

Bitcoin-the-system does not keep balances per address, that's just an authentication layer on top. The only thing that exists are coins, each potentially assigned to an address, and each transaction explicitly referring to the coins it consumes.

So, given that you have a 2 BTC coin and a 1 BTC coin (assigned to separate addresses, or to the same, doesn't matter), and you send 2 BTC somewhere, it will just take the 2 BTC coin, as that suffices. If you'd send 2.1 BTC somewhere, it will use both coins, and send 0.9 BTC back to a change address of yourself.

The GUI does not allow you to select inputs specifically, although the 0.7 release will allow you to do so when using the RPC interface.

I do Bitcoin stuff.
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!