Fix rpc-hanging deadlocks
authorGavin Andresen <gavinandresen@gmail.com>
Fri, 26 Aug 2011 18:37:23 +0000 (14:37 -0400)
committerGavin Andresen <gavinandresen@gmail.com>
Wed, 31 Aug 2011 16:55:16 +0000 (12:55 -0400)
commit6cc4a62c0e696dcb9d90ba0504f688e4f644a10f
tree5b365769be7c8be7caf6c31c4bdb1b4798be9ef4
parentb0243da77c6ee8d8ca59b4423f333a179bff02cf
Fix rpc-hanging deadlocks

Collapsed multiple wallet mutexes to a single cs_wallet, to avoid deadlocks with wallet methods that acquired locks in different order.
Also change master RPC call handler to acquire cs_main and cs_wallet locks before executing RPC calls; requiring each RPC call to acquire the right set of locks in the right order was too error-prone.
src/db.cpp
src/keystore.cpp
src/keystore.h
src/main.cpp
src/rpc.cpp
src/script.cpp
src/ui.cpp
src/wallet.cpp
src/wallet.h