Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: miso on March 05, 2014, 09:09:45 PM



Title: bitcoind sendfrom method - is it atomic?
Post by: miso on March 05, 2014, 09:09:45 PM
sendfrom <fromaccount> <tobitcoinaddress> <amount> [minconf=1] [comment] [comment-to]
Quote
Will send the given amount to the given address, ensuring the account has a valid balance using [minconf] confirmations. Returns the transaction ID if successful (not in JSON object).

But is this function atomic? Is bitcoind / bitcoin-qt multi threaded?
If the server receives many sendfrom requests at the same time, is it safe to use?
Thank you.

edit: hope they do not use bitcoin-qt http://www.coindesk.com/poloniex-loses-12-3-bitcoins-latest-bitcoin-exchange-hack/ (http://www.coindesk.com/poloniex-loses-12-3-bitcoins-latest-bitcoin-exchange-hack/)


Title: Re: bitcoind sendfrom method - is it atomic?
Post by: gmaxwell on March 05, 2014, 09:22:36 PM
All updates to the wallet single thread through a common lock, so yes, it's atomic.

Though no one should be using the accounts functionality for this sort of thing, as there is no safe way to back up that data (among other issues).


Title: Re: bitcoind sendfrom method - is it atomic?
Post by: miso on March 05, 2014, 09:33:46 PM
Thanks for reply. What is the problems with bitcoin-qt accounts?
There is no warning except "Account Weaknesses" https://en.bitcoin.it/wiki/Accounts_explained (https://en.bitcoin.it/wiki/Accounts_explained)
The only feature I am waiting for is watching only mode without workarounds.