Author

Topic: question about transferring money from many addresses bitcoind (Read 544 times)

cnk
newbie
Activity: 8
Merit: 0
What is withdrawal logic ? It takes money from random addressess if only total amount allows to do its operation?

bitcoind uses stochastic approximation to select a subset of unspent outputs to spend.
(actual code : https://github.com/bitcoin/bitcoin/blob/master/src/wallet.cpp#L1043-L1185)

There is an old thread about it here: https://bitcointalksearch.org/topic/how-does-the-bitcoin-client-choose-sendfrom-addresses-29207
full member
Activity: 224
Merit: 100
On many services - gambling and others - every user gets unique payment address.

According to this doc - https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list
i can do it with getnewaddress.
Also i can get total amount - getbalance.

And this command -
sendfrom    [minconf=1] [comment] [comment-to]

What is withdrawal logic ? It takes money from random addressess if only total amount allows to do its operation?
Jump to: