Commit graph

501 commits

Author SHA1 Message Date
Jeff Garzik
f5f1878ba1 Fix deadlocks in setaccount, sendfrom RPC calls
SendMoney*() now requires caller to acquire cs_main.
GetAccountAddress() now requires caller to acquire cs_main, cs_mapWallet.

Ordering is intended to match these two callchains[1]:

1. CRITICAL_BLOCK(cs_main)
    ProcessMessage(pfrom, strCommand, vMsg)
        AddToWalletIfMine()
              AddToWallet(wtx)
                  CRITICAL_BLOCK(cs_mapWallet)

2. CRITICAL_BLOCK(cs_main)
    ProcessMessage(pfrom, strCommand, vMsg)
        AddToWalletIfMine()
              AddToWallet(wtx)
                  CRITICAL_BLOCK(cs_mapWallet)
                      walletdb.WriteName(PubKeyToAddress(vchDefaultKey), "")
                          CRITICAL_BLOCK(cs_mapAddressBook)

Spotted by ArtForz.  Additional deadlock fixes by Gavin.

[1] http://www.bitcoin.org/smf/index.php?topic=4904.msg71897#msg71897
2011-04-04 22:24:35 -04:00
tcatm
454bc86479 allow coredumps by not catching SIGSEGV 2011-03-25 13:23:43 +01:00
Jeff Garzik
3a47bf7265 Merge branch 'master' of git://github.com/bitcoin/bitcoin 2011-03-23 18:28:50 -04:00
Jeff Garzik
8203ec4b11 [locale] Regenerate es, nl binary message catalogs 2011-03-23 18:27:09 -04:00
Jeff Garzik
0b8e4738f9 Merge branch 'master' of https://github.com/smola/bitcoin into tmp 2011-03-23 18:21:22 -04:00
Jeff Garzik
d38e683a6f Merge branch 'dutchloc' of https://github.com/sipa/bitcoin into tmp 2011-03-23 18:21:10 -04:00
tcatm
c3f140033c catch SIGINT, SIGHUP and SIGSEGV and shutdown cleanly 2011-03-23 18:27:30 +01:00
tcatm
1c09a4adb2 daemon-mode: add sleep() loop to prevent defunct child process, call setsid() in child 2011-03-21 12:11:05 +01:00
Sven Slootweg
a07dca7cd2 Updated dutch translation 2011-03-19 00:58:16 +01:00
Gavin Andresen
b7ebc662eb Update copyright in About box from 2010 to 2011 2011-03-17 15:09:41 +01:00
Santiago M. Mola
f30dabb2ac Update Spanish translation. 2011-03-16 20:56:03 +01:00
Jeff Garzik
e2e5f5cd9d Fix -logtimestamps to only print time prefix once per output line
Incorporate BlueMatt's fix to only timestamp upon new line, and
move -logtimestamp checking outside OutputDebugPrintF() to better
future-proof it.
2011-03-16 15:42:04 -04:00
Gavin Andresen
27b7f3b43a Merge branch 'shy' 2011-03-14 09:15:06 -04:00
Gavin Andresen
4b88647966 Merge branch 'dns-seed' of https://github.com/jgarzik/bitcoin 2011-03-13 17:15:59 -04:00
Gavin Andresen
d43fd8a038 Merge branch 'log-timestamp' of https://github.com/TheBlueMatt/bitcoin 2011-03-13 17:15:57 -04:00
Gavin Andresen
2abd56f428 Merge branch 'limitfree' of /Users/gavin/src/integration_btc 2011-03-13 17:15:44 -04:00
Gavin Andresen
1bf9b3b06f Merge branch 'daemon-mode' of https://github.com/tcatm/bitcoin 2011-03-13 17:15:34 -04:00
Gavin Andresen
dfd059173d Merge branch 'subcent-change' of https://github.com/tcatm/bitcoin 2011-03-13 17:15:28 -04:00
Gavin Andresen
b931ed8563 sendmany RPC command, to send to multiple recipients in one transaction. 2011-03-13 17:11:49 -04:00
Gavin Andresen
88abf70386 Make sure rate-limiting code is thread-safe 2011-03-13 14:38:07 -04:00
Gavin Andresen
5de8b54c51 Continuously rate-limit free transactions.
Changed algorithm to use continuous exponential function instead of discrete 10-minute window.
Changed -limitfreerelay to be kilobytes-per-minute instead of boolean.
2011-03-13 13:38:09 -04:00
tcatm
f4f2987273 remove from/message field from uiproject 2011-03-13 18:35:39 +01:00
Jeff Garzik
8f58d0dbc8 Merge branch 'smalltxfix' of https://github.com/gavinandresen/bitcoin-git into tmp 2011-03-10 14:32:19 -05:00
Jeff Garzik
12e091842f Merge branch 'master' of https://github.com/devrandom/bitcoin into tmp 2011-03-10 12:58:49 -05:00
Gavin Andresen
81d3b1c825 Update copyright in About box from 2010 to 2011 2011-03-10 10:50:46 -05:00
Gavin Andresen
32fb5dfef7 Bump version number to 0.3.21 (lest we forget) 2011-03-10 10:50:46 -05:00
Matt Corallo
ca221e6c21 Only log timestamps if -logtimestamps is set. 2011-03-09 21:48:11 +01:00
Matt Corallo
fe460d47b0 Add timestamp prefix to each line in the debug log (this time with human-readable times) 2011-03-09 19:53:40 +01:00
Jeff Garzik
448b4516ff dnsseed: fix printf 2011-03-08 22:55:29 -05:00
Jeff Garzik
f684aec4f3 DNS seeding 2011-03-08 22:40:50 -05:00
Gavin Andresen
cbc920d474 shy patch from Hal 2011-03-05 17:13:07 -05:00
tcatm
b104df742d Merge branch 'TheBlueMatt-setaccountfix' into integration 2011-03-05 17:26:14 +01:00
tcatm
8e5aaada2e Merge branch 'setaccountfix' of https://github.com/TheBlueMatt/bitcoin into TheBlueMatt-setaccountfix 2011-03-05 17:24:34 +01:00
Matt Corallo
c1f74f152b throw JSONRPCError(-5, "Invalid bitcoin address") instead. 2011-03-05 16:45:56 +01:00
Matt Corallo
279ab5e62f setaccount should return if an invalid address is provided.
This prevents setaccount from creating new accounts which do not have any addresses.
2011-03-05 15:32:32 +01:00
tcatm
e1205e4d15 -help: do not show -server and -daemon in bitcoind 2011-03-03 22:34:13 +01:00
tcatm
ea7cd31751 force fDaemon in bitcoind 2011-03-03 22:31:44 +01:00
tcatm
a79409afa9 fix whitespace 2011-03-03 22:27:20 +01:00
tcatm
dda48ccd0f fix -daemon switch 2011-03-03 22:26:00 +01:00
Gavin Andresen
f36b494aeb Make send/receive limits bigger (10MB each) 2011-03-03 16:25:05 -05:00
Gavin Andresen
395c1f44bd Fix minimum transaction fee calculation mismatch between CreateTransaction and CreateBlock 2011-03-02 16:27:24 -05:00
Gavin Andresen
411493b1f7 Merge branch 'rounding' 2011-03-02 15:03:49 -05:00
Luke Dashjr
a14bf1946d Bugfix: avoid sub-cent change (lost in fees) whenever possible 2011-03-01 02:10:07 +01:00
Gavin Andresen
8a9cad44a5 Avoid sprintf decimal-point localization 2011-02-28 21:34:36 +00:00
tcatm
6665aca024 fix missing newline in help 2011-02-28 04:53:22 +01:00
tcatm
c993ac6932 Merge branch 'rounding' of https://github.com/gavinandresen/bitcoin-git into gavinandresen-rounding 2011-02-26 04:37:13 +01:00
Matt Giuca
a357424a25 Added .gitignore, which prevents 'bitcoin' and 'bitcoind' from showing up in git. 2011-02-26 11:50:23 +11:00
tcatm
5078a54b52 Merge branch 'mgiuca-wx-config' into integration 2011-02-26 00:59:55 +01:00
Matt Giuca
84711b18bc build-unix.txt: Updated (now OK to use wxWidgets > 2.9.0). 2011-02-26 09:17:49 +11:00
Matt Giuca
84778a5b46 makefile.unix: Fixed errors building bitcoind without wxWidgets installed.
WXINCLUDEPATHS and WXLIBS now assigned with '=' instead of ':='.
    This means they are only evaluated on-demand, and they will never be
    requested by 'make bitcoind', so it won't try to call wx-config.
2011-02-26 09:12:42 +11:00